Personalized checkout and custom promotions with Shopify Scripts
Hi all,
I am currently using the Spotlight theme on Shopify.
I am fairly new to Shopify, let alone code all together. I am trying to figure out how to change the page that the "Continue Shopping button takes the viewer to the previous collection viewed or the shop all page? I have browsed everything pertaining to this issue, and yet, I cannot seem to get it to work myself. I know it is the line 29 in "main-cart-items.liquid" that I must change, but how should I write the code to change the link to what I want? Any help is greatly appreciated.
Link it takes customer:https://marianaclothing.com/collections/all
Link I wish for it to change to: Last collection viewed OR Shop All page: https://marianaclothing.com/pages/shop-all
I need help on how to write the code to replace the destination as I do not know how to implement the url correctly into the code.
Many thanks.
@marianaclothing Where you want to change the link of continue shopping?
I would like to change the link to either the last collection viewed or the shop all page. If I cannot do the last collection viewed, then the shop all page is best for me. The link for the shop all page is here: https://marianaclothing.com/pages/shop-all
I do not know how to write the code so the continue shopping button directs the customer to this page.
No, you don't understand, the continue shopping button only shows on Cart drawer and cart page so from these where you want to change the link? See below screenshot so we both are on right track -
I managed to figure it out myself. Thanks for your help.
Hi, how did you figure it out, my continue shopping button takes me to a random list of products. Thanks.
Tim.
Hi!
I found this question! I figured out how to change the link for the continue shopping button here https://www.youtube.com/watch?v=oe9sPkUkQog
It's a quick YT video.
How to on Dawn theme:
- Theme > "..." > Edit Code
- Open "sections/main-cart-items.liquid"
- Search for "continue" and find the "" next to "href".
- Substitute the path that was on before with the path you want the customer to take - in my case it was "/collections/todas-as-pecas"
AAAAAND that's it!!
(please if you know how to redirect to the last page seen by the user let me know 'cause I'm trying to figure that out! thanks!)
Hi!
If it helps, I was able to find a solution that redirects the "continue shopping" button to the last non-product page searched by the user preserving the page nr and filters.
That way:
- if user goes to a specific product page > adds to cart > goes to cart > clicks "continue shopping" > goes back to the last collection page navigated
- if user goes to a specific collection page > navigates through multiple pages > goes to cart > clicks "continue shopping" > goes back to the last page
- if user goes to any page / blog within the website > goes to cart > clicks "continue shopping" > redirect to a specific page of my choosing
** in my case I used the "/collections/todas-as-pecas" fallout, so you'd need to change that for you!
Hope this helps!
I wrote it down in this discussion: https://community.shopify.com/c/shopify-design/how-to-have-continue-shopping-link-return-to-previous...
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024