Add "final sale" verbiage to product page ONLY IF that product is tagged "sale"

Add "final sale" verbiage to product page ONLY IF that product is tagged "sale"

luxfactory
New Member
4 0 0

Hello,

 

I want "This product is not eligible for returns" to be displayed underneath the price on a product page if I tag that product with "final sale". What is the simplest way to do this on the Highlight theme?

 

Thanks in advance!

Replies 6 (6)

Mike-Consentik
Shopify Partner
173 29 36

Hi @luxfactory 

This is Mike from Omega

You can add code like this in product form liquid file:

{% if product.tags contains "final sale" %}
<p>This product is not eligible for returns. </p>
{% endif %}
If you find this helpful, please give it a like or mark it as a solution.
Consentik GDPR Cookie Banner: Effortlessly stay in compliance with EU GDPR and CCPA with Google Consent Mode V2. Free plan available and 24/7 Support
luxfactory
New Member
4 0 0

Hi @Mike-Consentik thank you! The bit of code works, but the placement isn't correct. I moved the liquid block to *above* the buy buttons, but it is still showing up below the buy buttons and other global fields. Any ideas what I'm doing wrong?

Mike-Consentik
Shopify Partner
173 29 36

Hi @luxfactory 

Could you send me your store url or a preview url, then I could check it for you?

If you find this helpful, please give it a like or mark it as a solution.
Consentik GDPR Cookie Banner: Effortlessly stay in compliance with EU GDPR and CCPA with Google Consent Mode V2. Free plan available and 24/7 Support
Ujjaval
Shopify Partner
1242 197 212

@luxfactory you need to find the "product__price-container" class name and put the above code under this price code. 

luxfactory
New Member
4 0 0

Hi @Ujjaval is it possible we don't have the "product_price-container" in our theme? I don't see it anywhere. Would it be under a different class name?