【问题标题】:Hide specific product in Shopify with Liquid based on customer tags根据客户标签在 Shopify 中使用 Liquid 隐藏特定产品
【发布时间】:2015-08-21 16:37:25
【问题描述】:

我希望在 Shopify 中对所有客户隐藏特定产品,但帐户上带有特定标签的客户除外。

我打算使用应用程序Lockdown,但它已停止使用。

到目前为止,我所学到的一切都表明我使用的是这样的东西:

{% if customer.tags contains 'Bundle' %}  
{% include 'product-to-be-shown' %}
{% endif %}

第二行是我卡住的地方,我认为我在正确的轨道上,但我不完全确定。

感谢任何指导,即使该指导为我提供了一条完整的途径来获得我正在寻找的解决方案。

【问题讨论】:

    标签: shopify liquid


    【解决方案1】:

    关门了……但没有雪茄……

    在您的产品模板上...改用这个...

    {% if customer.tags contains 'Bundle' %}  
    
       Show this product as usual. 
    
    {% else %}
    
       Politely tell this customer there is nothing here for them
    
    {% endif %}
    

    这就是任何锁定或其他批发应用程序所做的一切......绝对没有什么特别的......

    【讨论】:

    • 感谢大卫,工作完美。
    猜你喜欢
    • 2018-08-10
    • 2019-12-25
    • 2012-10-27
    • 2018-04-23
    • 2022-01-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多