Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Hello,
how to integrate non returnable product label in product page in dawn theme.
Thanks
Hi,
You can use custom label
Custom label code example (insert at main-product.liquid)
{% if product.tags contains 'Non-Returnable' %}
<div class="product-label">
<span class="label-text">Non-Returnable Product</span>
</div>
{% endif %}
use CSS for style
.product-label {
background-color: #f8d7da; /* Light red background */
color: #721c24; /* Dark red text */
padding: 5px 10px;
border-radius: 3px;
font-size: 14px;
font-weight: bold;
margin-bottom: 10px;
}
Hey @Small_Task_Help . I am also trying to do the same thing with my store but I am not sure. Where should I add the code which you have provided. I tried adding in my main-product.liquid file but it didn't worked. Is there any alternate way to do so. Do I need to add tag in my products as non returnable to make it work?