get environment

main
alexanderroese 2024-06-24 21:42:22 +02:00
parent 91f6539a10
commit d492e4716b
2 changed files with 10 additions and 2 deletions

View File

@ -59,7 +59,7 @@
endcapture
%}
console.log("2", "url {{ shx_get_environment }}", "{{ shop.url }}")
console.log("2", "url {{ shx_get_environment }}", "{{ shop.permanent_domain }}")
</script>

View File

@ -1 +1,9 @@
{{ shop.url }}
{% assign domain = shop.permanent_domain %}
{% if domain contains 'myshopify.com' %}
{% assign environment = 'development' %}
{% else %}
{% assign environment = 'production' %}
{% endif %}
"{{ environment }}"