window.Shopify.shop property on Inspect -> F12 debugger tools -> console

Hello, we run a Shopify website at http://skknbykim.com.
If I’m on the home page and I do inspect, I go to console and type “window.Shopify.shop” there.
I see value as ‘skkn-com.myshopify.com’.

Now If I open the mini-cart and select “Proceed to Checkout,” and then type “window.Shopify.shop” into the console on the checkout page, it returns undefined. Why is this behaviour occurring, how does Shopify handle it, and does it remove shop property on checkout on intention?

Same is happening with “window.Shopify.theme”

As part of the current content_for_header code in the theme you’ll see that var being created. Looking at the source you’ll find that.

Checkout isn’t loading the same content/header assets that the online store theme needs so expect some difference. Are you just trying to pull the myshopify url at checkout? You can look at the “Shopify.Checkout” object and you’ll see plenty in that.

Depending on what you’re trying to do there may be a better way to do it though. Given the merchant I assume you’ve got some contacts at Shopify from both a merchant/partner side.

These forums will get indexed too so completely understand if you want to go back and edit the myshopify url out of your post. I should remember what it’s for if you come back.

Thanks for helping.
As you said, “As part of the current content_for_header code in the theme you’ll see that var being created. Looking at the source you’ll find that”. – I didn’t understand this. Are you saying window.Shopify object gets created because of content_for_header?? Looking at the source, where do I look ?