How can I automatically calculate savings on my Dawn theme sales badges?

How i calculate same design save amount and save perchange automatic. I write manuelly “Save $50 (%50 Off)” How i change “sale” badge automatic calculate same design. I use dawn thema. Please help

my site: eycuf.com

@zamanhasanov96 - to automate, it will need code editing, add this given code in your text place and adjust as per the need

{% if product.compare_at_price > item.price_min %}

 {{ product.compare_at_price | minus: item.price_min | times: 100.0 | divided_by: product.compare_at_price | round }}% 

{% endif %}

Wehere i paste this code?

@zamanhasanov96 - put it where you added the manual text

NOT WORKING

@zamanhasanov96 - can you add me as collaborator? I will check the code and add it in proper place

I click edit language and find “Sale” badge and write manuel my offer there. My question about how this automatic calculate work?

@zamanhasanov96 - it checks if original price is more than sale price and if yes then calculate %

You do not understood what i want. I need editing “sale” badge code and change to other code which it calculate automatic

@zamanhasanov96 - i gave you code to automatically calculate sale, if yoy want to change text sale then check language settings

Thanj you for help. But I do not know where i paste this code.

You teld me paste where you add manuel text. I paste edit language sale badge it is not work

@zamanhasanov96 - you need to it in template code, are you familiar with coding?

Sametimes i copy paste different liqued file problem solved. I paste product template this code?

@zamanhasanov96 - yes copy paste this code in the place where you have the sale badge code, if difficult then better hire someone developer here and ask him/her to do it, here are many who can help.

Should i change this code with previously sale badge code? Or below paste previosly sale badge code?

@zamanhasanov96 - take backup of old code and then change with this new

I change previously code with your code sale badge completly disappear

Your code not working right. I find this code it is work. But i want show also amount but this code only show perchangte

-{{ compare_at_price | minus: price | times: 100 | divided_by: compare_at_price }}% OFF 

@zamanhasanov96 - try this

-{{ compare_at_price | minus: price | times: 100 | divided_by: compare_at_price }}% OFF 
 {{ compare_at_price | minus: price }} OFF