Ratan Kumar
Ratan Kumar

Reputation: 1650

Shopify script tag does not insert script tag to store

With all the proper authentication, these are the results :

ipdb> shopify.ScriptTag.find()
[script_tag(347035)]
ipdb> shopify.ScriptTag.get(347035)
{'updated_at': datetime.datetime(2013, 5, 9, 11, 29, 17, tzinfo=tzoffset(None, 19800)), 'src': 'http://itestifyit.com/widget/v1/mystore/script.js', 'created_at': datetime.datetime(2013, 5, 9, 11, 29, 17, tzinfo=tzoffset(None, 19800)), 'event': 'onload', 'id': 347035}

This means a script has been uploaded but I'm unable to find my script tag in the store's homepage.

What's wrong with it? And is there anything else I have to include to get it working?

After searching extensively on StackOverflow, I came across a post where someone mentioned that one will have to put the jquery script too but the jquery has already been included in the store page loaded by Shopify. Do i need to override that?

Any help will be appreciated.

Upvotes: 0

Views: 2361

Answers (1)

Denis
Denis

Reputation: 890

It doesn't actually show up as a <script> tag. Instead, your script is loaded via javascript, in the page asyncLoad() function. Look at the page source and look for that function. Your script should be loading there.

Also, if you are accessing the shopify page using HTTPS, your script will also need to be served over HTTPS, otherwise it will not be loaded.

Upvotes: 2

Related Questions