This topic has 8 replies, 3 voices, and was last updated 9 years by presto.

  • Author
  • #40596
     Jsb828Be
    Participant

    Hi!

    How to custom url woocommerce “return to shop/ Go to the shop” button? I would like to enter my own custom link when you press the “return to shop/ Go to the shop”.

    Thanks in advance!

    #40852
     Abe
    Keymaster

    Hi, that is generated by Woocommerce if you are referring to the cart page when you don’t have products in cart.
    The one from the menu cart then it is generated by the theme in this file wp-content/themes/kleo/lib/plugin-woocommerce/config.php in the function named kleo_woo_get_mini_cart around line 943.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #40855
     Jsb828Be
    Participant

    Thanks for the reply. So how exactly can i make that button my custom url? I tried editing code in ftp, but no luck.

    #40856
     Abe
    Keymaster

    You need basic php knowledge and change the line I suggested, the href attribute.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #40858
     Jsb828Be
    Participant

    In this line:
    $cart_output .= '<a class="btn btn-default kleo-go-shop" href="'.esc_url( $shop_page_url ).'"><span class="text">'.__('Go to the shop', 'kleo_framework').'</span></a>';
    change the
    '.esc_url( $shop_page_url ).'
    into my own url?
    Because i tried that and it didn’t work.

    #41039
     Abe
    Keymaster

    yes that is what I meant, so it will be like:

    COPY CODE
    
    $cart_output .= '<a class="btn btn-default kleo-go-shop" href="http://mysite.com/page"><span class="text">'.__('Go to the shop', 'kleo_framework').'</span></a>';
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #83799
     presto
    Participant

    Hi Abe,

    I have attempted to edit the menu cart ‘go to the shop’ button in the manner you have described here but the changes are not taking. I am uploading the edited config.php to kleo-child > lib > plugin-woocommerce.

    I changed the link to a URL from my site and changed the text on the button but neither of those changes are showing up. (I cleared my cache also; still no change.) Can you please tell me what I am missing?

    Thanks!

    #85826
     Abe
    Keymaster

    Sorry for the late reply.
    Unfortunately right now it is not possible to override the config file and only to change it in the main file

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #87377
     presto
    Participant

    Thanks Abe. It definitely works when I change the main file. Hopefully I can remember to continue to do this with updates.

    Angela

Viewing 9 posts - 1 through 9 (of 9 total)

The forum ‘KLEO’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?