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-Omega
Shopify Partner
133 26 28

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 it’s helpful to you, please give it a like or mark as a solution.
Need any help for Shopify Design or Custom task, please contact via email: locdt@omegatheme.com
Omega GDPR EU Cookie Banner: Effortlessly stay compliant with EU GDPR, CCPA
luxfactory
New Member
4 0 0

Hi @Mike-Omega 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-Omega
Shopify Partner
133 26 28

Hi @luxfactory 

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

If it’s helpful to you, please give it a like or mark as a solution.
Need any help for Shopify Design or Custom task, please contact via email: locdt@omegatheme.com
Omega GDPR EU Cookie Banner: Effortlessly stay compliant with EU GDPR, CCPA
Ujjaval
Shopify Partner
1242 197 197

@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?