Show Amount Save On Product Page Debut Theme

Tofik
Visitor
1 0 0
Hey someone there to assist me as I want to display save amount on product page as I've code for showing percentage off % but instead I want to show amount what's implement i need?
Mentioned code below for % off 
 
 
           <span id="YouSave" class="product-save green"> &nbsp;              
            ( {{ product.compare_at_price | minus:product.price | times:100 | divided_by:product.compare_at_price }}% OFF )
              </span>
 
 
 
 
Replies 12 (12)

oscprofessional
Shopify Partner
15830 2369 3072

Hello,
To display save amount on product page.
Add this code at the bottom of
Online Store->Theme->Edit code->Snippets->product.price.liquid

 


<div class="you-save">
{% if product.compare_at_price_max > product.price %}"You save ({{ product.compare_at_price_max | minus: product.price|money}})"{% endif %}
</div>

Get pass your Store Core Web Vital Free Speed Optimization Audit, Chat on WhatsApp | Skype : oscprofessionals-87 | Email: pallavi@oscprofessionals.com | Custom Pricing Wholesale App : Free | Hire us | Guaranteed Site Speed Optimization | Website Free Audit | Shopify Theme Customization | Build Shopify Private App | Shopify SEO | Digital Marketing
wadsad
Visitor
1 0 0

Hello thank you it worked how do I change the collor

oscprofessional
Shopify Partner
15830 2369 3072

What you want to change? give me the link

Get pass your Store Core Web Vital Free Speed Optimization Audit, Chat on WhatsApp | Skype : oscprofessionals-87 | Email: pallavi@oscprofessionals.com | Custom Pricing Wholesale App : Free | Hire us | Guaranteed Site Speed Optimization | Website Free Audit | Shopify Theme Customization | Build Shopify Private App | Shopify SEO | Digital Marketing
tapestryzone
Visitor
1 0 0

Thank you, i also got this. How do i change the "You save" text size & color?

oscprofessional
Shopify Partner
15830 2369 3072

@tapestryzone ,

please share the URL. with screenshot...

Get pass your Store Core Web Vital Free Speed Optimization Audit, Chat on WhatsApp | Skype : oscprofessionals-87 | Email: pallavi@oscprofessionals.com | Custom Pricing Wholesale App : Free | Hire us | Guaranteed Site Speed Optimization | Website Free Audit | Shopify Theme Customization | Build Shopify Private App | Shopify SEO | Digital Marketing
jayantvyas
Visitor
3 0 0

Hey, I want to show this section of the collections list in the cart drawer. I am using the refresh theme and this option is only available for the cart page. 

 

Untitled design (5).jpg

wasimkhann
Shopify Partner
18 0 1

Hey, Will this work on Dawn Theme 10.0? I want to show SAVE AMOUNT on offers products in my store.

Shafiqul_dot_me
Shopify Expert
6 0 0

Hi Wasim,
Thank you for posting here.
Please try this.

SAVE {{ product.price | minus: product.compare_at_price | money_without_trailing_zeros }}
 
Thanks

Thanks
Shafiqul Islam
Gerapreneur
Shopify Partner
4 0 0

Hi, is there a way to make this work for products with variants? 

 

Whenever I have a variant, the calculation breaks for that product.

 

Thanks!

Shafiqul_dot_me
Shopify Expert
6 0 0

Hi @Gerapreneur,
It should work fine with variants on the main product template.
If you want on the collection template then the code block will change.

Thanks

Shafiqul Islam
Gerapreneur
Shopify Partner
4 0 0

Thanks for your answer.

It is not working for products with variants - the calculation of the amount saved is not correct and it shows the same amount for every other variant. 

To clarify, there is no issue when its a single variant item.

Gerapreneur
Shopify Partner
4 0 0

Hey there, is there a way to make this work with variants?