File tree Expand file tree Collapse file tree 2 files changed +38
-1
lines changed
app/code/Magento/Multishipping/view/frontend Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,8 @@ var config = {
10
10
orderOverview : 'Magento_Multishipping/js/overview' ,
11
11
payment : 'Magento_Multishipping/js/payment' ,
12
12
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'
14
15
}
15
16
}
16
17
} ;
Original file line number Diff line number Diff line change
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
+ } ) ;
You can’t perform that action at this time.
0 commit comments