2014-10-22 110 views
0

我正在使用Shopify来为我的电子商务网站供电,并试图在每个收藏中显示产品。我想为每个不同的收藏有一个部分。我如何使用Liquid来做到这一点?下面的代码将打印正确的名称,但我不能得到图像,价格或链接到他们的网页。Shopify收集显示产品信息

{% for product in collections.colectionOne.products %} 
    {{ product.title }} 
    {{ product.image }}<!-- this line does not work, nor will it in a img tag as the sorce --> 
{% endfor %} 

{% for product in collections.colectionTwo.products %} 
    {{ product.title }} 
{% endfor %} 

回答

0
{% for product in collections.supa-zxhibt.products %} 
    {{ product.title }} 
    <a href="{{product.url}}"><img src="{{ product.featured_image | product_img_url: 'thumb' }}" /></a> 
    {{ product.price | money }} 
{% endfor %}