Skip to content

Commit ccf2a78

Browse files
authored
🔃 [EngCom] Public Pull Requests - 2.2-develop
Accepted Public Pull Requests: - #13141: Fix missing discount label in checkout (by @ihor-sviziev) - magento-engcom/magento2ce#1207: No locale for Swedish (Finland). (by @nmalevanec) - #13082: Fix Magento_Checkout address formatting (by @nfourteen) Fixed GitHub Issues: - #11428: Cart Price Rule Label is not working (reported by @sasilinux) has been fixed in #13141 by @ihor-sviziev in 2.2-develop branch Related commits: 1. 976182b 2. 3fc1f40 3. 0f36e0e - #11497: Discount Rule does not show Default Rule Label (reported by @pmoreno1980) has been fixed in #13141 by @ihor-sviziev in 2.2-develop branch Related commits: 1. 976182b 2. 3fc1f40 3. 0f36e0e - #13095: No locale for Swedish (Finland) (reported by @rasmuswikman) has been fixed in magento-engcom/magento2ce#1207 by @nmalevanec in 2.2-develop branch Related commits: 1. ecaa2c0
2 parents 4700a06 + 1fe486d commit ccf2a78

File tree

10 files changed

+40
-4
lines changed

10 files changed

+40
-4
lines changed

app/code/Magento/Checkout/view/frontend/web/template/billing-address/details.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<div class="billing-address-details" data-bind="if: isAddressDetailsVisible() && currentBillingAddress()">
88
<!-- ko text: currentBillingAddress().prefix --><!-- /ko --> <!-- ko text: currentBillingAddress().firstname --><!-- /ko --> <!-- ko text: currentBillingAddress().middlename --><!-- /ko -->
99
<!-- ko text: currentBillingAddress().lastname --><!-- /ko --> <!-- ko text: currentBillingAddress().suffix --><!-- /ko --><br/>
10-
<!-- ko text: currentBillingAddress().street --><!-- /ko --><br/>
10+
<!-- ko text: _.values(currentBillingAddress().street).join(", ") --><!-- /ko --><br/>
1111
<!-- ko text: currentBillingAddress().city --><!-- /ko -->, <span data-bind="html: currentBillingAddress().region"></span> <!-- ko text: currentBillingAddress().postcode --><!-- /ko --><br/>
1212
<!-- ko text: getCountryName(currentBillingAddress().countryId) --><!-- /ko --><br/>
1313
<!-- ko if: (currentBillingAddress().telephone) -->

app/code/Magento/Checkout/view/frontend/web/template/shipping-information/address-renderer/default.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<!-- ko if: (visible()) -->
88
<!-- ko text: address().prefix --><!-- /ko --> <!-- ko text: address().firstname --><!-- /ko --> <!-- ko text: address().middlename --><!-- /ko -->
99
<!-- ko text: address().lastname --><!-- /ko --> <!-- ko text: address().suffix --><!-- /ko --><br/>
10-
<!-- ko text: address().street --><!-- /ko --><br/>
10+
<!-- ko text: _.values(address().street).join(", ") --><!-- /ko --><br/>
1111
<!-- ko text: address().city --><!-- /ko -->, <span data-bind="html: address().region"></span> <!-- ko text: address().postcode --><!-- /ko --><br/>
1212
<!-- ko text: getCountryName(address().countryId) --><!-- /ko --><br/>
1313
<!-- ko if: (address().telephone) -->

app/code/Magento/SalesRule/view/frontend/web/js/view/summary/discount.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,25 @@ define([
4444
return this.totals()['coupon_label'];
4545
},
4646

47+
/**
48+
* Get discount title
49+
*
50+
* @returns {null|String}
51+
*/
52+
getTitle: function () {
53+
var discountSegments;
54+
55+
if (!this.totals()) {
56+
return null;
57+
}
58+
59+
discountSegments = this.totals()['total_segments'].filter(function (segment) {
60+
return segment.code === 'discount';
61+
});
62+
63+
return discountSegments.length ? discountSegments[0].title : null;
64+
},
65+
4766
/**
4867
* @return {Number}
4968
*/

app/code/Magento/SalesRule/view/frontend/web/template/cart/totals/discount.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<!-- ko if: isDisplayed() -->
88
<tr class="totals">
99
<th colspan="1" style="" class="mark" scope="row">
10-
<span class="title" data-bind="text: title"></span>
10+
<span class="title" data-bind="text: getTitle()"></span>
1111
<span class="discount coupon" data-bind="text: getCouponLabel()"></span>
1212
</th>
1313
<td class="amount" data-bind="attr: {'data-th': title}">

app/code/Magento/SalesRule/view/frontend/web/template/summary/discount.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<!-- ko if: isDisplayed() -->
88
<tr class="totals discount">
99
<th class="mark" scope="row">
10-
<span class="title" data-bind="text: title"></span>
10+
<span class="title" data-bind="text: getTitle()"></span>
1111
<span class="discount coupon" data-bind="text: getCouponCode()"></span>
1212
</th>
1313
<td class="amount">

app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module/_cart.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@
8080
margin-bottom: 0;
8181
overflow: inherit;
8282
}
83+
84+
.discount.coupon {
85+
display: none;
86+
}
8387
}
8488

8589
// Products table

app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module/checkout/_order-summary.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@
4949
}
5050
}
5151

52+
.discount.coupon {
53+
display: none;
54+
}
55+
5256
.grand.incl {
5357
& + .grand.excl {
5458
.mark,

app/design/frontend/Magento/luma/Magento_Checkout/web/css/source/module/_cart.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@
166166
text-align: left;
167167
}
168168
}
169+
170+
.discount.coupon {
171+
display: none;
172+
}
169173
}
170174

171175
// Products table

app/design/frontend/Magento/luma/Magento_Checkout/web/css/source/module/checkout/_order-summary.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@
4949
}
5050
}
5151

52+
.discount.coupon {
53+
display: none;
54+
}
55+
5256
.grand.incl {
5357
& + .grand.excl {
5458
.mark,

lib/internal/Magento/Framework/Locale/Config.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ class Config implements \Magento\Framework\Locale\ConfigInterface
8989
'sq_AL', /*Albanian (Albania)*/
9090
'sr_Cyrl_RS', /*Serbian (Serbia)*/
9191
'sv_SE', /*Swedish (Sweden)*/
92+
'sv_FI', /*Swedish (Finland)*/
9293
'sw_KE', /*Swahili (Kenya)*/
9394
'th_TH', /*Thai (Thailand)*/
9495
'tr_TR', /*Turkish (Turkey)*/

0 commit comments

Comments
 (0)