Adding product color availability under product title on Dawn Theme

Hello @ebon ,

Edit product-card.liquid under snippets, now here search for this code

{%- if product_card_product.featured_media -%}
          
            {{ product_card_product.title | escape }}
          
        {%- endif -%}

once you find it then jut in next line paste this code

{%- assign prodcard_variant_count = 0 -%}
{%- assign color_label = 'color,Color,Colour,colour' | split: ',' -%}

{%- for option in product_card_product.options_with_values -%}
	{%- assign downcased_option = option.name | downcase -%}

	{%- if color_label contains downcased_option -%}
		{%- assign variant_option = 'option' | append: forloop.index -%}

		{%- for value in option.values -%}
			{%- assign downcased_value = value | downcase -%}
              {%- for variant in product_card_product.variants -%}
                {%- if variant[variant_option] == value -%}
        			{% assign prodcard_variant_count = prodcard_variant_count | plus: 1 %}
                {%- endif -%}
        
              {%- endfor -%}

		{%- endfor -%}

    {%- endif -%}

{%- endfor -%}
        {{ prodcard_variant_count }}   Colors

Thanks