2014-01-13 32 views
0

我在我的網站中插入shopify商店。他們有一個他們使用的小工具,拉起一個集合,你可以添加到購物車並結賬。他們給我的嵌入代碼在下面,應該插入它們之間。需要網站幫助,添加一家商店。 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」按鈕都連接到不同的集合。

「查看我的store2」代碼與第1個代碼相同,但集合:[14849869]更改爲不同的數字。

回答

0

你可以用幾個iframe創建一個index.html。每個iframe將擁有其商店的代碼和<base target="_parent" />