Shopify - 更改不透明度已售罄产品的缩略图

时间:2018-05-08 07:44:15

标签: javascript java e-commerce shopify product

我希望在文章售完时将缩略图应用于缩略图,是否可能?

<div class="product-details">
  {% if settings.display_vendor %}
    <span itemprop="brand" class="brand">{{ product.vendor }}</span>
  {% endif %}
  <span class="title" itemprop="name">{{ product.title }}</span>

  {% if collection_handles contains 'coming-soon' %}
    <span class="modal_price">{{ 'collections.general.coming_soon' | t }}</span>
  {% else %}
    <span class="price {% if product.compare_at_price_max > product.price %}sale{% endif %}">
      {% if product.available %}
        {% if product.price_varies and product.price_min > 0 %}
          <small><em>{{ 'products.general.from' | t }}</em></small>
        {% endif %}
          {% if product.price_min > 0 %}
            <span class="money">{{ product.price_min | money }}</span>
          {% else %}
            {{ settings.free_price_text }}
          {% endif %}
      {% else %}
        <span class="sold_out">UH OH, WE’RE OUT</span>
      {% endif %}
      {% if product.compare_at_price_max > product.price %}
        <span class="was_price">
          <span class="money">{{ product.compare_at_price_max | money }}</span>
        </span>
      {% endif %}
    </span>
  {% endif %}
  {% if settings.enable_shopify_collection_badges and settings.enable_shopify_review_comments %}
    <span class="shopify-product-reviews-badge" data-id="{{ product.id }}"></span>
  {% endif %}
</div>

非常感谢你的帮助。

0 个答案:

没有答案