简体   繁体   English

shopify checkout中的脚本标签

[英]Script Tags in shopify checkout

I'm looking at developing an app for Shopify which will add functionality to a store's checkout page. 我正在为Shopify开发一个应用程序,它将为商店的结账页面添加功能。 It would be ideal if the user didn't have to copy and paste code into files themselves hence I was looking at using the ScriptTag API ( http://api.shopify.com/scripttag.html ) to include a custom javascript file. 如果用户不必将代码复制并粘贴到文件中,那将是理想的,因此我正在使用ScriptTag API( http://api.shopify.com/scripttag.html )来包含自定义javascript文件。

I've worked through some of the examples on the aforementioned API page and can get a custom script included on every page on my test store except for the checkout page. 我已经完成了前面提到的API页面上的一些示例,除了结帐页面之外,我可以在我的测试商店的每个页面上都包含自定义脚本。 I've changed the src to start with 'https://' as suggested by the tutorial but my script still doesn't run or even appear in the page source for the checkout. 我已经按照教程的建议将src更改为以“https://”开头,但我的脚本仍然没有运行,甚至还没有出现在结帐的页面源中。

Does anybody have any ideas how I can get this working for the checkout? 有没有人有任何想法如何让我的结账工作? Is what I'm trying to do even possible? 我正在努力做甚么可能吗?

The only page of the checkout that script-tags are loaded into is the Thank You page that appears after an order has been completed. 结束脚本标签的结帐的唯一页面是订单完成后出现的“谢谢”页面。

The pages for steps 1 & 2 of the checkout cannot have script-tags added to them for security reasons. 出于安全原因,结帐的步骤1和2的页面不能添加脚本标签。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM