Skip to content

Commit 428eb60

Browse files
committed
MC-39820: Not be displayed Payment Method in Check Out with Multiple Addresses
1 parent c9242e8 commit 428eb60

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

app/code/Magento/Multishipping/view/frontend/requirejs-config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ var config = {
1010
orderOverview: 'Magento_Multishipping/js/overview',
1111
payment: 'Magento_Multishipping/js/payment',
1212
billingLoader: 'Magento_Checkout/js/checkout-loader',
13-
cartUpdate: 'Magento_Checkout/js/action/update-shopping-cart'
13+
cartUpdate: 'Magento_Checkout/js/action/update-shopping-cart',
14+
multiShippingBalance: 'Magento_Multishipping/js/multi-shipping-balance'
1415
}
1516
}
1617
};
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/**
2+
* Copyright © Magento, Inc. All rights reserved.
3+
* See COPYING.txt for license details.
4+
*/
5+
6+
define([
7+
'jquery',
8+
'mage/dataPost',
9+
'jquery-ui-modules/widget'
10+
], function ($, dataPost) {
11+
'use strict';
12+
13+
$.widget('mage.multiShippingBalance', {
14+
options: {
15+
changeUrl: ''
16+
},
17+
18+
/**
19+
* Initialize balance checkbox events.
20+
*
21+
* @private
22+
*/
23+
_create: function () {
24+
this.element.on('change', $.proxy(function (event) {
25+
dataPost().postData({
26+
action: this.options.changeUrl,
27+
data: {
28+
useBalance: +$(event.target).is(':checked')
29+
}
30+
});
31+
}, this));
32+
}
33+
});
34+
35+
return $.mage.multiShippingBalance;
36+
});

0 commit comments

Comments
 (0)