Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Use availablity.on_sale instead of discount

jxltom13a49a486e1c
diff --git a/templates/product/_items.html b/templates/product/_items.html
index ab31b80e14..bbebb2ef6a 100644
--- a/templates/product/_items.html
+++ b/templates/product/_items.html
@@ -21,7 +21,7 @@
<div class="panel-footer">
{% if availability.available %}
{% price_range availability.price_range %}
- {% if availability.discount != None %}
+ {% if availability.on_sale %}
{% if availability.price_range_undiscounted.start != availability.price_range.start %}
<div class="product-list__sale">
<svg data-src="{% static "images/sale-bg.svg" %}" />
diff --git a/templates/product/details.html b/templates/product/details.html
index 9d47911156..8828a5ce1f 100644
--- a/templates/product/details.html
+++ b/templates/product/details.html
@@ -130,7 +130,7 @@
{% else %}
<h2 class="product__info__price">
<span>{% price_range availability.price_range %}</span>
- {% if availability.discount != None %}
+ {% if availability.on_sale %}
<small class="product__info__price__undiscounted">
{% price availability.price_range_undiscounted %}
</small>