From 163a62476e118a1fcbcf0f2782cd4ca1e0136a55 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 9d3ba3b7d46..1da4d15e326 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 %}