【问题标题】:shopify collection displaying product info显示产品信息的 shopify 集合
【发布时间】:2014-12-17 09:46:28
【问题描述】:

我正在使用 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 %}

【问题讨论】:

    标签: html shopify liquid


    【解决方案1】:
    {% 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 %}
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-09-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-08-24
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多