Clear cart on refresh

New Member
4 0 0

Hello,
I want to clear the cart on refresh like some putt items on cart and then goes back on shopping page then its cart should be cleared. (some specific items i have the ids of them and want to call ajax API for that) but I dnt know where to post that code.
Theme: SImplistic
Thanks in advance

Regards

0 Likes
Tourist
9 0 1

you can add that code on header or footer page.

0 Likes
New Member
4 0 0

Add there but need to refresh the page to make cart clear but can't figure out where to put location.reload() so it gets reload just once. Currently, it just goes in a loop of reloading
Please guide me in that as I'm new to Shopify and learning things

Regards

0 Likes