Why isn't my customized liquid code displaying for specific vendor?

Why isn't my customized liquid code displaying for specific vendor?

orhl1234
Shopify Partner
110 0 9

I made a customized code but it didn't work. I have a vendor called ARTISAN
{% if product.vendor == 'ARTISAN' %}

<h1>ARTISAN products</h1>

{% endif %}

Replies 2 (2)

niraj_patel
Shopify Partner
2391 516 513

Hello @orhl1234 

Try this code
{% assign vendor_name = product.vendor | strip %}
  {% if vendor_name == 'ARTISAN' %}
      <h1>ARTISAN products</h1>
  {% endif %}
Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.

Shopify Partner || Helping eCommerce Stores
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution.
- For further discussion contact: Email ID- info@techlyser.com

PageFly-Oliver
Shopify Partner
878 190 185

Hi @orhl1234 ,

You can try

 

{% if product.vendor contains 'ARTISAN' %}

<h1>ARTISAN products</h1>

{% endif %}

 

 

Hope my solution works perfectly for you!

Best regards,

Oliver | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


PageFly - #1 Page Builder for Shopify merchants.


All features are available from Free plan. Live Chat Support is available 24/7.