How can i add a sale badge on top of the image like this example:
On my side the badge currently displays underneath the product.
How can i add a sale badge on top of the image like this example:
On my side the badge currently displays underneath the product.
Hello there.
Here is code which you can use to display sale badge
{% if product.compare_at_price_max > product.price %}You Save {{ product.compare_at_price_max | minus: product.price | times: 100.0 | divided_by: product.compare_at_price_max | money_without_currency | times: 100 | remove: '.0'}}% {% endif %}
Note: You have to add it in collection and product template a/to theme also have to adjust css accordingly.
I have the code already. I need to display it on top of the image like the example.
Please share your store URL and password.
So that I will check and let you know the exact solution here.
I want the sake badge on the top right of the product image like the example shown
Hello there.
.price__badges.price__badges--listing {
position: absolute;
top: 0;
right: 0;
}