【发布时间】:2013-07-26 19:23:22
【问题描述】:
我在 Shopify 网站上使用了一个 fancyzoom jQuery 插件,我需要为阴影、closebox 等图像指定一个目录路径。
这里是 jQuery 插件语言:
var zoomImagesURI = 'DirectoryStringGoesHere/'; // Location of the zoom and shadow images
inImage2.setAttribute('src',zoomImagesURI+'closebox.png');
here 提出了与我类似的问题,答案基本上是使用 Shopify API。我发现的 API 的有用部分如下:
键
{ "key" : "assets/bg-body-green.gif"}
商店内资产的路径。例如,资产 bg-body-green.gif 位于 assets 文件夹中。
public_url
{ "public_url" : "http://static.shopify.com/assets/bg.gif?1"}
资产的面向公众的 URL。
这似乎应该很简单,但我无法让它为我工作。有什么建议么?
谢谢,尼克
【问题讨论】: