Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I'm confused why my conditional statement on cart page works written one way vs the other. Looking for an explanation or a solution.
1. If the account had tag1, it would show the condition. But if the account had tag2 it wouldn't output the condition statement
{% if customer.tags contains "tag1" and line_item.vendor == "vendor1"
or customer.tags contains "tag2" and line_item.vendor == "vendor1" %}
{% elsif customer.tags contains "tag1" and line_item.vendor == "vendor2" or customer.tags contains "tag2" and line_item.vendor == "vendor2" %}
2. However, if I write it this way, it works.
{% if line_item.vendor == "vendor1" and customer.tags contains "tag1" or line_item.vendor == "vendor1" and customer.tags contains "tag2" and line_item.vendor == "vendor1" %}
Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025