|
4 | 4 | */
|
5 | 5 |
|
6 | 6 | define([
|
| 7 | + 'underscore', |
7 | 8 | 'Magento_Checkout/js/model/quote',
|
8 | 9 | 'Magento_Checkout/js/model/shipping-rate-processor/new-address',
|
9 | 10 | 'Magento_Checkout/js/model/cart/totals-processor/default',
|
10 | 11 | 'Magento_Checkout/js/model/shipping-service',
|
11 | 12 | 'Magento_Checkout/js/model/cart/cache',
|
12 |
| - 'Magento_Customer/js/customer-data', |
13 |
| - 'Magento_Checkout/js/checkout-data', |
14 |
| - 'Magento_Checkout/js/action/select-shipping-method' |
15 |
| -], function (quote, defaultProcessor, totalsDefaultProvider, shippingService, cartCache, customerData, checkoutData, selectShippingMethodAction) { |
| 13 | + 'Magento_Customer/js/customer-data' |
| 14 | +], function (_, quote, defaultProcessor, totalsDefaultProvider, shippingService, cartCache, customerData) { |
16 | 15 | 'use strict';
|
17 | 16 |
|
18 | 17 | var rateProcessors = {},
|
19 | 18 | totalsProcessors = {},
|
20 | 19 |
|
| 20 | + /** |
| 21 | + * Cache shipping address until changed |
| 22 | + */ |
| 23 | + setShippingAddress = function () { |
| 24 | + var shippingAddress = _.pick(quote.shippingAddress(), cartCache.requiredFields); |
| 25 | + cartCache.set('shipping-address', shippingAddress); |
| 26 | + }, |
| 27 | + |
21 | 28 | /**
|
22 | 29 | * Estimate totals for shipping address and update shipping rates.
|
23 | 30 | */
|
@@ -65,14 +72,6 @@ define([
|
65 | 72 | }
|
66 | 73 | },
|
67 | 74 |
|
68 |
| - /** |
69 |
| - * Cache shipping address until changed |
70 |
| - */ |
71 |
| - setShippingAddress = function () { |
72 |
| - var shippingAddress = _.pick(quote.shippingAddress(), cartCache.requiredFields); |
73 |
| - cartCache.set('shipping-address', shippingAddress); |
74 |
| - }, |
75 |
| - |
76 | 75 | /**
|
77 | 76 | * Estimate totals for shipping address.
|
78 | 77 | */
|
|
0 commit comments