根据客户标签使用 Liquid 在 Shopify 中隐藏特定产品

Hide specific product in Shopify with Liquid based on customer tags

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

我本来打算使用该应用程序 Lockdown,但它已停用。

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

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

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

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

关闭..但没有雪茄...

在您的产品模板上...改为使用此...

{% if customer.tags contains 'Bundle' %}  

   Show this product as usual. 

{% else %}

   Politely tell this customer there is nothing here for them

{% endif %}

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