Dawn: change 'continue shopping' link for multiple markets

my store: nanonutrients.myshopify.com

Currently the ‘continue shopping’ link defaults to collections/all.

I don’t want it going there. I want it going to collections/shop.

In main-cart-items.liquid it lists the URL for the ‘continue shopping’ button as:

href=“{{ routes.all_products_collection_url }}”

If I start typing some new text after ‘routes.’ a box pops up showing me a list of available presets.

(See attached screen shot)

Collections/shop is not one of them.

I don’t want to put in a static URL like nanonutrients.myshopify.com/collections/shop because I sell in multiple markets. That URL above would take you to the shop in my primary market which is Australia. I also sell in New Zealand and South Africa. If I used that static link, someone shopping in New Zealand for example would click ‘continue shopping’ and be taken to the shop for Australia.

So I need to enter something in that ‘routes.’ URL that will refer to the shop for the market the shopper is currently in.

eg.

if someone from New Zealand clicked on ‘continue shopping’ it would take them to:
nanonutrients.myshopify.com/en-nz/collections/shop

if someone from South Africa clicked on ‘continue shopping’ it would take them to:
nanonutrients.myshopify.com/en-za/collections/shop

How can I achieve this?

Instead of using one of the routes objects, you can still try use other liquid object like shop combined with request.locale

{{ shop.url }}/{{ request.locale.iso_code}}/collections/shop

I didn’t test by the way, I need to setup a quick dev store to check it, but you can try in the meanwhile.

Hey thanks DD,

That almost works.

My primary market is Australia. The URL for that store is:

nanonutrients.myshopify.com

If I switch to our New Zealand store:

**nanonutrients.myshopify.com/**en-nz

I tried adding your code into the continue shopping href and it returned this when I click the link.

https://nanonutrients.myshopify.com/en/collections/shop

It returns the same URL whether I am in the Australian store or the New Zealand store.

However - your suggestion gave me another idea. I tried the following and it works!

href=“{{ routes.collections_url }}/shop”

I’m using the Dawn (v9) theme so the Continue Shopping links are found in two places:

  • main-cart-items.liquid
  • cart-drawer.liquid

Thanks for your help

Dan.