Change sale badge to show percent off

Bette_Daoust
New Member
1 0 0

Where would this code go when using the Simple theme?

 

I want to show the %off for my sale badge

0 Likes
Alan_Monzalvo
New Member
2 0 0

hello kasimir I have on my product page the option that shows the percentage but when I change a variant with different price I no longer change the percentage could you help me see how to do it?

https://www.ibushak.com/products/audifonos-skullcandy-navigator-con-micro-on-ear?_sc=1&design_theme_...

0 Likes
Rasleen_Sahni
Tourist
4 0 2

@Kasimir wrote:

Hello Paddy,

It differs on what theme you are working with.

Can you tell me what theme you working with? And I can point you to the right direction.

Kasimir


Where should this code go in the Minimal theme? Appreciate your help!

0 Likes
gomonke
Shopify Partner
2 0 0

Hi, this works for me

 

{% assign result = product.price | times: 1.0 | divided_by: product.compare_at_price %}
{% assign result = 1 | minus: result | times: 100 | ceil %}

0 Likes
Bishal
New Member
1 0 0

Hi, 

I am having the same problem. I want to show the discount percentage on my store. Please if you could help me or if there is any app that can work please inform me. thanks.


@Kasimir wrote:

Hello Paddy,

Fantastic question.

Let me try to explain this.

Yes this is absolute possible. Depending on the theme the code placement would vary. I'm giving you an option how the calculation could be done, this would give you a percentage for example 20%:

{{ product.price | times: 100 | divided_by: product.compare_at_price_max | ceil | append: '%' }}

For sanity sake your case may vary, and depending on if you have different variant prices the case may also make it harder to do accurately. You could always show something like "Up to 50% Off" if your variant prices differ.

Let me know if this is sufficient or if you need extra guidance.

Kasimir


 

0 Likes
Fayzmo
Shopify Partner
222 17 84

Hey everyone,

I noticed that you wanted to apply discount badges (with % value) on your catalog images.

We have developed an app (Modemagic) that will help you add product stickers/badges on your catalog within seconds. And we have an extensive collection of customized stickers based on different occasions (Sale & Discounts, Pre-Order, Trust Badges and much more) You can also create custom badges based on what copy you prefer.

Over here, you can choose what value of discount you would like in the badge, customizability is available.

Screenshot 2020-08-19 at 12.54.04 PM.pngScreenshot 2020-08-19 at 12.54.32 PM.pngScreenshot 2020-08-19 at 12.55.19 PM.pngScreenshot 2020-08-18 at 10.48.51 PM.png

No complex edits, no back & forth with designers. Update your store within seconds! And it's free.

Don’t find a sticker that meets your need, reach out to us on chat for a custom design. We also create stickers in various languages. Check out this app on Shopify here.

Hope this helps

Fayaz

ModeMagic
Featured on Shopify Staff Picks
0 Likes
Ziggycart
New Member
1 0 0

Hello could you help me remove my sale tags

0 Likes