Back to shop link in shopping basket with wrong link

Home Forums Calendar Products Events Calendar PRO Back to shop link in shopping basket with wrong link

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1418384
    RSM
    Participant

    Hi there,

    I just setup events calendar and tickets and found the following.
    WooCommerce sets an back to shop button in the shopping basket, this is linked to the shop root of WooCommerce. On a pure event site, this is misleading, as it should go back to the events slug.
    The Shop base can be configured within the WooCommerce settings, however only for real pages, not the event slugs.

    Any idea on how I can have this correctly set up?

    Regards
    Chris

    #1418796
    Victor
    Member

    Hi Chris!

    Thanks for reaching out to us! Let me help you with this topic.

    The Return to Shop link is generated by WooCommerce in the cart-empty.php template file located at /wp-content/plugins/woocommerce/templates/cart/

    You can modify that link or event remove it by making a template override of that template in your own theme (yourtheme/woocommerce/cart/cart-empty.php)

    Let me point you to the following WooCommerce documentation about their template structure > https://docs.woocommerce.com/document/template-structure/

    I hope that helps. Let me know if you have any follow up questions.

    Best,
    Victor

    #1418864
    RSM
    Participant

    Hi Victor,

    thanks for the help, that pointed me in the right direction. However to be update stable on themes and woocommerce, I decided to use the following snippet to override.

    function wc_empty_cart_redirect_url() {
    return 'http://your_url_here/';
    }
    add_filter( 'woocommerce_return_to_shop_redirect', 'wc_empty_cart_redirect_url' );

    Best regards & thanks again
    Chris

    #1419307
    Victor
    Member

    Hey Chris!

    That’s a great option too! Thanks for following up to share the snippet so other users can make use of it.

    I’ll close this now, but feel free to open a new topic if anything comes up and we’ll be happy to help.

    Have a good weekend!
    Victor

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Back to shop link in shopping basket with wrong link’ is closed to new replies.