mirceapiturca / Sections

Shopify sections for everyone. Tooltips, FAQ, Quiz, and App Performance
https://sections.design
MIT License
173 stars 80 forks source link

Suggestion - Extend functionality for Shopify Markets #14

Open rockeynebhwani opened 2 years ago

rockeynebhwani commented 2 years ago

We have a situation where we are using Shopify Markets (for US and Canada) and we have a third-party app on PDPs. That functionality is only required on US PDPs and not on Canada PDPs.

Third party app doesn't have support for Shopify Markets. URLs in our case, look like this

www.example.com (For US) www.example.com/en-ca (For Canada)

All URLs on Canadian sit has '/en-ca' in URL.

If will be great if we have support for suppressing third party JS in certain markets (based on URL patterns).

mirceapiturca commented 2 years ago

Hi @rockeynebhwani , Thank you for the suggestion.

There is a PR done for this functionality but unfortunately, I did not merge it to master. Please have a look at https://github.com/mirceapiturca/Sections/pull/13 and let me know if this will work for you.

Thanks

rockeynebhwani commented 2 years ago

@mirceapiturca - I am still new to Shopify and I am not sure if understand all the code in this PR.

Also, when I said 'third-party app' in my comment, I meant this is a Shopify app installed from Shopify app store which we want to block in one of the markets.

In this PR, I couldn't see where are we providing URL pattern for Shopify storefront to block the app based on that URL pattern.

bredowmax commented 2 years ago

Yes, please!

We are facing exactly the same scenario and so far are using liquid conditionals {% if localization.country.iso_code == "US" %} for that