Remove cart page

Highlighted
Tourist
26 0 3

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. 

0 Likes
Highlighted
Shopify Partner
2354 511 661

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.
Do you need custom changes on store ? Hire me.
Feel free to Contact me on dmw.webartisan@gmail.com
Follow us on Instagram @dmw.webartisan
0 Likes
Highlighted
Tourist
26 0 3

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

0 Likes
Highlighted
Shopify Partner
2354 511 661

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.
Do you need custom changes on store ? Hire me.
Feel free to Contact me on dmw.webartisan@gmail.com
Follow us on Instagram @dmw.webartisan
0 Likes
Highlighted
Tourist
26 0 3

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

0 Likes
Highlighted
Shopify Partner
2354 511 661

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.
Do you need custom changes on store ? Hire me.
Feel free to Contact me on dmw.webartisan@gmail.com
Follow us on Instagram @dmw.webartisan
0 Likes
Highlighted
Tourist
26 0 3

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. 

1 Like
Highlighted
Shopify Partner
2354 511 661

Hey @adamjw3,

Sure, you can.

Thanks!

If helpful then please Like and Accept Solution.
Do you need custom changes on store ? Hire me.
Feel free to Contact me on dmw.webartisan@gmail.com
Follow us on Instagram @dmw.webartisan
0 Likes