Live Sale in specific market

Live Sale in specific market

alexian
Shopify Partner
10 0 0

Hi Everyone, Hope you all are doing well. I have 3 markets in my store, and I want to make a sale live on my website, but I want the sale to be live in only 2 markets. The sale will go live in those 2 markets, not in the 3rd one there is no issue. But when the sale goes live, I will add sale banners, sale-related popups, and a sale counter on the product page. I want these three things — the sale counter, sale popup, and sale banner — to only show in the 2 markets, and not in the 3rd market. Is that possible?

Reply 1 (1)

DaveedValencia
Shopify Partner
26 5 5

Yes, this is possible with a little coding. 

 

{% capture market_sale %}{{ localization.market.handle }}{% endcapture %}

    {% if market_sale == "us" or market_sale == "ca" %}
    Show this...
    {% else %}
    This will show if not either of those markets...
    {% endif %}

 

Replace "us" and "ca" with the two markets that you are running the sale. You can control what shows using these conditions.

 

Then after the "else" you can show the regular non sale messaging.

 

There are several ways to get this to work it depends on your theme.