WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
[resolved] Add A "VIEW CART" Button To Product Page?? (4 posts)

  1. rbschneider1
    Member
    Posted 1 year ago #

    Ver 2.0.20 - No Custom Theme, just added to current website

    How do I add a "View Cart" button to the Produce Page?
    Is there a "short code" for this and to what page do I add it to?

    When I add a product to the cart on the Product Page, I get the line that says "product was successfully added to your cart." which also has the "View Cart" button. But, if I view other products after that (i.e.; Related Products) there is no way to view my shopping cart.

    Also, how do I remove the "View Cart" button from the Product page on the line that says "Product was successfully added to your cart."?

    Thank you in advance for your help.

    P.S.
    Love the plugin, very flexible......

    https://wordpress.org/plugins/woocommerce/

  2. rbschneider1
    Member
    Posted 1 year ago #

    My solution -

    Add the following to "content-single-product.php", just above the first
    "<?php" tag (line 1):

    <div style="text-align: right;">
    <p class="buttons">
    a href=""Return to Shop
    a href=""View Cart
    a href=""Checkout
    </p>
    </div>

    NOTE: You will need to complete the a href tags, I had to type it this way to get it to show up on this page without actual links.

    Use c s s to customize.

  3. rbschneider1
    Member
    Posted 1 year ago #

    Correction to above post - My solution -

    Add the following to "content-single-product.php" (or other pages), anywhere you want it on the page, but outside of a "<?php...?>" tag.

    <div style="text-align: right;">
    <p>
    a href="http://www.site.com/shop/cart/" class="button">View Cart
    a href="http://www.site.com/shop/checkout/" class="button checkout">Checkout
    </p>
    </div>

    NOTE: Add the "<" in front of each "a" to complete the a tags.

    Use css to customize.

  4. wiresplus
    Member
    Posted 1 year ago #

    ?? Woo has a standard widget for this, pre-installed. Just go to widgets, and add the one called 'My Cart'. Tick the box for 'Hide if empty' and hey presto!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.