Skip to content

Instantly share code, notes, and snippets.

View alquezajanmaverick's full-sized avatar
👨‍💻

Jan Maverick Alqueza alquezajanmaverick

👨‍💻
View GitHub Profile
@alquezajanmaverick
alquezajanmaverick / domain-redirection.liquid
Last active September 11, 2023 21:24
Shopify Domain Redirection
<script>
/**
* Geolocation app must be installed
* redirection variable -> list of supported countries with specifi domain extension ( assigned via Shopify Markets setting )
*/
(()=>{
let published_locales = {{ shop.published_locales | json }}
let shop_locales = published_locales.map(locale=>locale.shop_locale.locale.toLowerCase())
let redirection = ["cz","dk","fi","fr","gr","it","nl","pl","pt","es","se"]