Hi guys
pls help me move " Sale " label badge to TOP Right and change Sale label to xx%
i tried some code but it not work.
thank you for support me
Hi guys
pls help me move " Sale " label badge to TOP Right and change Sale label to xx%
i tried some code but it not work.
thank you for support me
pls support me.
Hi @mr_Lynk
Please share your store URL
https://q6b8qsir9nm1dny6-85507440942.shopifypreview.com
here you are.
You can move label to top right from Online Store > Themes > Customize > Collections > Product grid > Theme settings > change option Position on cards
Then go Online Store > Themes > Edit code > open card-product.liquid file, and find this line of code around line 135
{{- 'products.product.on_sale' | t -}}
Replace it with this code and save file
{{ card_product.compare_at_price_max | minus: card_product.price | times: 100.0 | divided_by: card_product.compare_at_price_max | money_without_currency | times: 100 | remove: '.0'}}%
thank for support. i already change but i wanna add minus
Ex: -50%
and i want to change color is red or any color i choose
can you change help me box size. i want it smaller
You can do that by adding this code to theme.liquid file after in Online Store > Themes > Edit code
yes. It worked well
thank you so much
You are most welcome.
Hey,
I did this and it worked, except it shows -0%? (while the price is discounted, the original price is crossed out).
Could you share your store URL?
Please try to update the code to this and check again.
{{ card_product.compare_at_price_max | minus: card_product.price | times: 100.0 | divided_by: card_product.compare_at_price_max | money_without_currency | times: 100 }}%
Still shows 0%. the url is: rosa-elysian.com. I currently just renamed the sale badge to -30% at the theme content haha. But i need it to be automaticly
I used the code on my Dawn 15.2.0, and it worked well. Could you add the code and take a screenshot where did you add code so I can check?
I can’t upload the screenshot i took, it doesnt support .jpg. But i found the exact code you provided at line 140, deleted that and replaced it with your code. Maybe it’s because i use the radient theme? (shouldnt be a problem i guess since its dawn based)?
So please try to use this code instead
{{ product.compare_at_price_max | minus: product.price | times: 100.0 | divided_by: product.compare_at_price_max | money_without_currency | times: 100 | round }}%
still shows 0% if i add the new code..