Shopify themes, liquid, logos, and UX
(Snippet Code 1 ) {% render 'error-value' %}
{% assign BISAC_value = product.metafields.Neato.BISAC %} {% if BISAC_value == "BIO000000" %} {% assign category = "Biography & Autobiography / General" %} {% elsif BISAC_value == "BIO023000" %} {% assign category = "Biography & Autobiography / Adventurers & Explorers" %} {% elsif BISAC_value == "BIO002010" %} {% assign category = "Biography & Autobiography / African American & Black" %} {% elsif BISAC_value == "BIO002040" %} {% assign category = "Biography & Autobiography / Arab & Middle Eastern" %} {% elsif BISAC_value == "BIO001000" %} {% assign category = "Biography & Autobiography / Artists, Architects, Photographers" %} {% elsif BISAC_value == "BIO002020" %} {% assign category = "Biography & Autobiography / Asian & Asian American" %} {% elsif BISAC_value == "BIO034000" %} {% else %} {% assign category = "Other" %} {% endif %}
(Snippet Code 2 ) {% render 'error-value1' %}
{% assign BISAC_value = product.metafields.Neato.BISAC %} {% if BISAC_value == "JUV034000" %} {% assign category = "Juvenile Fiction / Royalty" %} {% elsif BISAC_value == "REF008000" %} {% assign category = "Reference / Dictionaries" %} {% elsif BISAC_value == "REF009000" %} {% assign category = "Reference / Directories" %} {% elsif BISAC_value == "REF010000" %} {% assign category = "Reference / Encyclopedias" %} {% elsif BISAC_value == "REF011000" %} {% assign category = "Reference / Etiquette" %} {% elsif BISAC_value == "REF013000" %} {% assign category = "Reference / Genealogy & Heraldry" %} {% elsif BISAC_value == "REF015000" %} {% assign category = "Reference / Personal & Practical Guides" %} {% elsif BISAC_value == "REF018000" %} {% assign category = "Reference / Questions & Answers" %} {% else %} {% assign category = "Other" %} {% endif %} <p> <div class="h4 inline-richtext"><strong> Category: </strong> {{ category }} </div> </p>
How we can use the above two codes on product page
( this code not working )
{% assign error_value = section.settings.error_value %} {% if error_value == "Category: Other" %} {% render "error-value" %} {% else %} {% render "error-value1" %} {% endif %}
I want output like this
Try this
{% assign error_value = section.settings.error_value %}
{% if error_value == "Other" %}
{% render "error-value" %}
{% else %}
{% render "error-value1" %}
{% endif %}
{% render "error-value" %} is not working when is equal to error_value == "Other"
Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024