需要网站帮助,添加商店。 Shopify

时间:2014-01-13 02:41:39

标签: javascript html shopify shop

我正在将shopify商店插入我的网站。他们有一个小部件,他们使用它来提取一个集合,你可以添加到购物车和结帐。他们给我的嵌入代码在下面,应该插入。

<script type="text/javascript">
  var ShopifyStoreConfig = {shop:"glow-station-shop.myshopify.com", collections:[14849869]};
  (function() {
    var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; 
    s.src = "//widgets.shopifyapps.com/assets/shopifystore.js";
    var x = document.getElementsByTagName('script')[0]; x.parentNode.insertBefore(s, x);
  })();  
</script>

然后我必须将以下代码放在我希望他们在我的实际网站中点击的位置。

    <a href='#shopify-store'>View my Store</a> 

我的问题是我需要改变什么,我可以有多个这种连接到不同产品的实例。一个例子是“查看我的商店”和“查看我的商店2”按钮,它们都连接到不同的集合。

“查看我的商店2”代码与第1代相同,但收藏品:[14849869]更改为其他数字。

1 个答案:

答案 0 :(得分:0)

您可以创建一个包含多个iframe的index.html。每个iframe都有其商店的代码和<base target="_parent" />

相关问题