Determine the `market` from a liquid template

In our shop we use the Markets feature and we need to customise some templates depending on the market you are visiting from. There’s any liquid variable or tag to determine the market you are visiting from?

Using the locale or currency doesn’t work since they are not unique or each market.

Cheers!

Hi @maximco

At the moment there is no easy Liquid access for the Market chosen, I would invite you to check that link: How to Customize Content by Country with Shopify in case this could help, your alternative would seem to go via countries instead of markets.

Cheers!

To find the current market use {{ localization.market.handle }}

5 Likes

This is correct and should be accepted as the solution @maximco

1 Like

This worked, thanks!

@RMedia would you know if we have this data available on JS as well? Otherwise I guess we could store this as a hidden variable in HTML

how can be get that the selected market is default or not?