From 1ddeacac94749e56620f31a8dd6ed4fc85dd0baa Mon Sep 17 00:00:00 2001 From: Rodrigo Santellan Date: Wed, 13 Jun 2018 09:16:13 -0300 Subject: [PATCH 1/2] When searching for the title if search for all the segments that has a discount title making it possible displaying custom discounts. --- .../SalesRule/view/frontend/web/js/view/summary/discount.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/SalesRule/view/frontend/web/js/view/summary/discount.js b/app/code/Magento/SalesRule/view/frontend/web/js/view/summary/discount.js index 6df769a90894e..f2924fe48e01b 100644 --- a/app/code/Magento/SalesRule/view/frontend/web/js/view/summary/discount.js +++ b/app/code/Magento/SalesRule/view/frontend/web/js/view/summary/discount.js @@ -57,7 +57,7 @@ define([ } discountSegments = this.totals()['total_segments'].filter(function (segment) { - return segment.code === 'discount'; + return segment.code.indexOf('discount') !== -1; }); return discountSegments.length ? discountSegments[0].title : null; From 85577bdf3d8059d1f3cdde4749b6cd58e3693827 Mon Sep 17 00:00:00 2001 From: Rodrigo Santellan Date: Fri, 29 Jun 2018 09:55:49 -0300 Subject: [PATCH 2/2] Fix discount label. --- .../SalesRule/view/frontend/web/js/view/summary/discount.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/SalesRule/view/frontend/web/js/view/summary/discount.js b/app/code/Magento/SalesRule/view/frontend/web/js/view/summary/discount.js index 6df769a90894e..f2924fe48e01b 100644 --- a/app/code/Magento/SalesRule/view/frontend/web/js/view/summary/discount.js +++ b/app/code/Magento/SalesRule/view/frontend/web/js/view/summary/discount.js @@ -57,7 +57,7 @@ define([ } discountSegments = this.totals()['total_segments'].filter(function (segment) { - return segment.code === 'discount'; + return segment.code.indexOf('discount') !== -1; }); return discountSegments.length ? discountSegments[0].title : null;