How to change color of "Sold out" for products

Highlighted
Tourist
11 0 0

Hi, is there a way to change the color of the "sold out" text for products? I would want to change it to red, right not it is hard to see

0 Likes
Highlighted

<span class="btn__text">
                    {% if current_variant.available %}
                      {{ 'products.product.add_to_cart' | t }}
                    {% else %}
                      {{ 'products.product.sold_out' | t }}
                    {% endif %}
                  </span>

{% if current_variant.available %}
                  		<span class="btn__text">
                      {{ 'products.product.add_to_cart' | t }}
                          </span>
                  
                    {% else %}
                    <span class="btn__text sold_out_product">
                       {{ 'products.product.sold_out' | t }}
                      </span>
                    {% endif %}

.btn__text.sold_out_product {
    color: red;
}
Want to modify or incorporate custom changes on store, Hire us.
If helpful then please Like and Accept Solution .
Email: pallavi@oscprofessionals.com
Skype : oscprofessionals-87
Free Review and advice for sale on store | Shopify Private App | Custom Theme Development | Custom Modifications In To Shopify Theme | SEO & Digital Marketing | Site Speed Optimization | Performance Site Audit
0 Likes
Highlighted
New Member
4 0 0

hi, can I use this with a debut theme? I cant seem to find that first code thank you


@oscprofessional wrote:

<span class="btn__text">
                    {% if current_variant.available %}
                      {{ 'products.product.add_to_cart' | t }}
                    {% else %}
                      {{ 'products.product.sold_out' | t }}
                    {% endif %}
                  </span>

{% if current_variant.available %}
                  		<span class="btn__text">
                      {{ 'products.product.add_to_cart' | t }}
                          </span>
                  
                    {% else %}
                    <span class="btn__text sold_out_product">
                       {{ 'products.product.sold_out' | t }}
                      </span>
                    {% endif %}

.btn__text.sold_out_product {
    color: red;
}

 

0 Likes