From 8f0b9c9406291a65a8b933d99067abc247dcc4c5 Mon Sep 17 00:00:00 2001 From: marination Date: Mon, 10 May 2021 17:28:22 +0530 Subject: [PATCH] fix: Show Offers section only if offers exist --- .../generators/item/item_add_to_cart.html | 48 ++++++++++--------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/erpnext/templates/generators/item/item_add_to_cart.html b/erpnext/templates/generators/item/item_add_to_cart.html index 9d3ba3b7d4..1da4d15e32 100644 --- a/erpnext/templates/generators/item/item_add_to_cart.html +++ b/erpnext/templates/generators/item/item_add_to_cart.html @@ -45,31 +45,33 @@ {% endif %} -
-

Offers

-
- {% for offer in doc.offers %} -
-
- - - - - - + {% if doc.offers %} +
+

Offers

+
+ {% for offer in doc.offers %} +
+
+ + + + + + +
+

+ {{ _(offer.offer_title) }}: + {{ _(offer.offer_subtitle) }} + + {{ _("More") }} + +

-

- {{ _(offer.offer_title) }}: - {{ _(offer.offer_subtitle) }} - - {{ _("More") }} - -

+ {% endfor %}
- {% endfor %} -
+ {% endif %}