Shopify script tag does not insert script tag to store

旧街凉风 提交于 2019-12-12 00:35:40

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/16455636/shopify-script-tag-does-not-insert-script-tag-to-store

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!