Displaying Tags

JaredAddair
New Member
1 0 0

I am trying to display product tags into my product description. Everything is working fine except for a tag "Width of Base: #". Below is the code. Keep in mind it is working correctly for all other tags except for the width tag.

 

{% for tag in product.tags %}
            
  {% if tag contains "Bangs"%}
    {%- assign units_tag =  tag -%}
  {%endif%}
 
{% if tag contains "Crown"%}
    {%- assign units_tag1 =  tag -%}
{%endif%}
 
{% if tag contains "Nape"%}
    {%- assign units_tag2 =  tag -%}
{%endif%}
 
{% if tag contains "Height"%}
    {%- assign units_tag4 =  tag -%}
{%endif%}
 
{% if tag contains "Width of Base: 5"%}
    {%- assign units_tag5 =  tag -%}
  {%endif%}
 
{% if tag contains "Hair Length"%}
    {%- assign units_tag6 =  tag -%}
{%endif%}
 
{% if tag contains "Overall"%}
{%- assign units_tag7 =  tag -%}
{%endif%}
 
{% if tag contains "Weight"%}
{%- assign units_tag3 =  tag -%}
 
<p style="font-family:roboto;"><strong>
                  {%if units_tag != blank%} {{units_tag}} |{%endif%} 
                  {%if units_tag5 != blank%} {{units_tag5}} |{%endif%} 
                  {%if units_tag1 != blank%} {{units_tag1}} |{%endif%} 
                  {%if units_tag2 != blank%} {{units_tag2}} |{%endif%}
                  {%if units_tag3 != blank%} {{units_tag3}} |{%endif%}
                  {%if units_tag4 != blank%} {{units_tag4}} |{%endif%}
                  {%if units_tag6 != blank%} {{units_tag6}} |{%endif%}
                  {%if units_tag7 != blank%} {{units_tag7}} |{%endif%}</strong></p>           
{%break%}
  {%endif%}
 
{% endfor %}
Replies 0 (0)