【问题标题】:Shopify - Remove 'buy it now' and 'add to cart' button from the theme template on some product pagesShopify - 从某些产品页面的主题模板中删除“立即购买”和“添加到购物车”按钮
【发布时间】:2021-07-05 07:16:21
【问题描述】:

你好 Shopify 开发者。

我是 Shopify 的新手。我想编辑产品主题模板,以便能够从某些产品中删除立即购买并添加到购物车按钮。

你能给我一个建议吗?请教我。

最好的问候,西瓦。

【问题讨论】:

标签: shopify


【解决方案1】:

如果我理解您的话,您想从某些产品中删除“添加到购物车”按钮吗? 如果是这种情况,您可以使用一些标签来执行此操作。比如:

{% if product.tags contains 'your-tag' %}

   {% comment %} Something here {% endcomment %}
{% else %}
  {% comment %} Add to cart button {% endcomment %}
{% endif %}

【讨论】:

    【解决方案2】:

    添加一个类似这样的标签:

    隐藏--加入购物车

    并在 product.liquid 中找到添加到购物车按钮并将其放置如下:

    {% unless product.tags contains 'hide--add-to-cart' %}
        place here your add to cart button
    {% endif %}
    

    【讨论】:

      猜你喜欢
      • 2015-01-15
      • 2015-05-24
      • 2016-06-20
      • 2014-06-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多