Personalized checkout and custom promotions with Shopify Scripts
Hey Community, I am new to shopify development and I just created a new product-form file which should display different content based on whether the current product is sold out or not. It contains the following code:
<!-- /snippets/product-not-available.liquid --> {% comment %} Show different product forms based on status of product (out of stock, upcoming product) {% endcomment %} {% if product.available == false %} <div class="product-not-available"> <h3>Sold out</h3> </div> {% elsif product.tags contains "upcoming" %} {% endif %}
Now, i want the h3-tag to be displayed in red and added the following lines to my scss file:
.product-not-available h3{ color: red; }
The Problem is that the h3 Tag is shown in black instead of my desired color and hex codes don't work either. Do you have any ideas how i can fix this issue?
Solved! Go to the solution
This is an accepted solution.
<div class="product-not-available">
<h3 class="sold-out">Sold out</h3>
</div>
.sold-out{
color: red !important;
}
This is an accepted solution.
<div class="product-not-available">
<h3 class="sold-out">Sold out</h3>
</div>
.sold-out{
color: red !important;
}
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025