[Support request] Modify Cart Panel Button

Home Forums Support [Support request] Modify Cart Panel Button

Home Forums Support Modify Cart Panel Button

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1490745
    Matt

    Hello, hopefully simple request.

    On Adding to cart, the cart panel shows up correctly. There is a checkout button that also is there.

    Can you help change that “Checkout” button to go to the Cart (and say View Cart) instead of the checkout page on the cart panel?

    We are requiring coupon codes to be entered in the cart, so they need to go there first.

    Thanks for the great theme, we have used it for years!

    #1490905
    Leo
    Staff
    Customer Support

    Hi there,

    This might be something you will need to check with WooCommerce support team as the theme only adds appearance options to WooCommerce and does not alter the functionality.

    Can you link me to the page in question so I can confirm that?

    Thanks πŸ™‚

    #1490925
    Matt

    The code for it is in your functions.php file.

    Lines 1264-1266 of /functions/functions.php

    <div class="checkout">
    <a href="<?php echo wc_get_checkout_url(); ?>" class="button"><?php _e( 'Checkout', 'gp-premium' ); ?></a>
    </div>

    Changing it to

    <div class="checkout">
    <a href="<?php echo wc_get_cart_url(); ?>" class="button"><?php _e( 'View Cart', 'gp-premium' ); ?></a>
    </div>

    Creates the functionality I prefer. I just have no clue how to do that via filter/hook.

    Thanks πŸ™‚

    #1490934
    Leo
    Staff
    Customer Support

    Ok so all you wanted to do is to change the Checkout text and not the link?

    Does this help?
    http://shitalmarakana.com/change-proceed-checkout-add-cart-view-cart-button-text-woocommerce/

    #1490957
    Matt

    I must not be explaining myself well, I am sorry.

    In the Generatepress theme customization option, you can layout, then woocommerce. In there, there is an option for “Display cart panel on add to cart”

    When you add an item to the cart, an ajax header slides down, and gives you the option to “continue shopping”, Notify you the item was added to your cart, cart quantity, and cart totals. Then there is a button that says “Checkout”.

    I want only that button to say “View Cart”, and that to go to the cart. I dont want Checkout, nor the URL to checkout. The regular cart page is fine, and the regular checkout process is fine. Only on this “cart panel”

    The code mentioned above makes it look and function they way I want it to. All said and done it looks like this.

    Cart Button

    This is the only button/text I want changed. Everywhere else its fine. Thanks for all your help!

    #1491105
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Usually I add filters and hooks everywhere, but I didn’t in this case for some reason.

    I’ve made a note to add this in 1.13.0 – feel free to give me a shout in this thread once 1.13.0-alpha.1 is out and I’ll help with the filter πŸ™‚

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.