Popup cart – change path for "checkout" button (again)

This topic has 6 replies, 3 voices, and was last updated 5 years, 5 months ago ago by Rose Tyler

  • Avatar: cherbst
    Christian
    Participant
    June 13, 2017 at 12:34

    Hi,

    you solution for this was before:
    In the file wp-content/themes/theleader/framework/woo.php in line 314 I replaced get_checkout_url with get_cart_url.

    But this have changed now. How can I get the same effect back with The Leader 2.4?

    /C.

    5 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    June 14, 2017 at 10:33

    Hello,

    Try to change wc_get_checkout_url() to wc_get_cart_url() in 348 line.

    Regards,
    Rose Tyler.

    Avatar: finleydesign
    finleydesign
    Participant
    October 29, 2018 at 18:02

    I can’t seem to get this amend to work, I have found the file in, im trying to change the URL of the checkout button on the popup

    I’m on version 2.5, logins are in private

    Please, contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    October 30, 2018 at 09:16

    Hello @finleydesign,

    In wp-content/themes/theleader/framework/woo.php file you can find etheme_cart_items function, copy this function into child theme functions.php file and change http://prntscr.com/lc4n0r appropriate to your needs.

    Regards

    Avatar: finleydesign
    finleydesign
    Participant
    October 30, 2018 at 10:45

    I have changed that, but it make no difference front end, in fact I changed the text as well, which you can see for a split second, then it changes back to “Checkout” but the link doesn’t change

    I haven’t moved it to the child theme as yet, and do I con’y copy that one line, or the complete function?

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    October 30, 2018 at 10:50

    Hello @finleydesign,

    You need to copy all code of the function https://prnt.sc/lc5zai into child theme and then make changes, for example
    <?php echo '<a href="' . esc_url( wc_get_checkout_url() ) . '" class="button active big checkout-button">' . '<span> ' . esc_html__('Checkout', ETHEME_DOMAIN) . '</span>' . '</a>'; ?>
    >>>>>>
    <?php echo '<a href="https://www.8theme.com/topic/popup-cart-change-path-for-checkout-button-again/#post-201976" class="button active big checkout-button">' . '<span> ' . esc_html__('Checkout', ETHEME_DOMAIN) . '</span>' . '</a>'; ?>
    Then clear cache and check.

    Regards

  • Viewing 6 results - 1 through 6 (of 6 total)

The forum ‘TheLeader Support Forum’ is closed to new topics and replies.

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.