Can you disable or hide the back to cart link in Shopify?

adamjw3
Excursionist
26 0 7

I’m using cart js to add items to an In page cart, so no need for a cart.liquid page. However if I go to checkout you see a back to cart link. I don’t want a cart page.anyway to disable this or hide it?

One way I could do this is just javascript redirect to the homepage when you get to the cart page. Is this ok? Can you do a redirect in liquid?

anyone got a better idea or done this before? 

thanks. 

Replies 8 (8)

dmwwebartisan
Shopify Partner
12280 2546 3694

Hey @adamjw3,

I think it is best to redirect the URL to the home page. If we change the liquid and if in future you need cart page that you will have to change code and do the stuff again. So instead of it just put redirection which you can do from admin.

Check this link.

This will guide you on how you can put redirect for the cart page.

Hope this will help.

 

Thanks!

 

 

If helpful then please Like and Accept Solution | Email: dmw.webartisan@gmail.com |  Instagram: @dmw.webartisan
Check here PageFly App to customize your pages | #1 Product Filter & Search app on Shopify | The most powerful Shopify page builder app
adamjw3
Excursionist
26 0 7

Thanks for your quick reply. That link says you can’t redirect cart pages using that technique. 

dmwwebartisan
Shopify Partner
12280 2546 3694

Hey @adamjw3,

Ahh, sorry that was my bad. Well then will have to go check out the liquid and where says back to cart page. You need to block/comment that liquid code.

So that link will disappear and no one click there.

Thanks!

 

 

If helpful then please Like and Accept Solution | Email: dmw.webartisan@gmail.com |  Instagram: @dmw.webartisan
Check here PageFly App to customize your pages | #1 Product Filter & Search app on Shopify | The most powerful Shopify page builder app
adamjw3
Excursionist
26 0 7

The back to cart is in the checkout page so can’t edit that. 

dmwwebartisan
Shopify Partner
12280 2546 3694

Hey @adamjw3,

Yeah, it needs Shopify plus plan. If you can do that with javascript like you said that will be fine but do you have an idea how would you do it?

Thanks!

 

If helpful then please Like and Accept Solution | Email: dmw.webartisan@gmail.com |  Instagram: @dmw.webartisan
Check here PageFly App to customize your pages | #1 Product Filter & Search app on Shopify | The most powerful Shopify page builder app
adamjw3
Excursionist
26 0 7

Yeah. I’ve put it in the head of the layout. Not got the code to hand but I use liquid to check that the template is cart, and then just do a redirect with js to / (homepage). Works great and put it in the head so it triggers as soon as we hit the page. 

I have another question, I wonder if I can dm you about it. 

dmwwebartisan
Shopify Partner
12280 2546 3694

Hey @adamjw3,

Sure, you can.

Thanks!

If helpful then please Like and Accept Solution | Email: dmw.webartisan@gmail.com |  Instagram: @dmw.webartisan
Check here PageFly App to customize your pages | #1 Product Filter & Search app on Shopify | The most powerful Shopify page builder app

ttbinfo
Excursionist
15 0 1

Hi, sorry to jump on but did you ever manage to do this? I’ve been trying to find a way to redirect the cart page but it’s an issue as it’s still an active webpage.