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.
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 -
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!)
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!