Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
For the Shopify stores that use the domain in format e.g: https://abcde.com. How can I get its .myshopify.com domain?
In the liquid template, is there any object which i can get the myshopify.com domain from?
Would appreciate any help.
Solved! Go to the solution
This is an accepted solution.
Hi all,
Thanks for your suggestions. Based on the Shopify document, i found we can get .myshopify.com domain from liquid object as below:
Thanks
You can get the
URL:
{{ shop.url }}
Domain :
{{ shop.domain }}
Hit Like and Accept as Solution
Hi @EddieLuong,
You can find the myshopify domain of a store by viewing the source code.
Simply go to any Shopify store, right-click on the page and select View Page Source in Google Chrome. Or Show Page Source in Safari. Once you will see the HTML code of the store, press CTRL + F in Windows or Command ⌘ + F in macOS, and enter "myshopify.com".
Often, it is stored in the "Shopify.shop" variable located in the <head> section.
I hope it helps.
This is an accepted solution.
Hi all,
Thanks for your suggestions. Based on the Shopify document, i found we can get .myshopify.com domain from liquid object as below:
Thanks