From fe9c02273faf102dfd1608c08810f58aa84c8e7a Mon Sep 17 00:00:00 2001 From: Valentin Fayard Date: Wed, 29 May 2019 15:39:07 +0200 Subject: [PATCH] Add payload-extender feature to modify shipping address payload In Magento v2.2.2 payload extender has been added to checkout. This feature allows third-party extension to modify the payload for the shipping address selection process. https://devdocs.magento.com/guides/v2.2/release-notes/ReleaseNotes2.2.2CE.html --- .../js/model/shipping-save-processor/store-delivery.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/view/frontend/web/js/model/shipping-save-processor/store-delivery.js b/view/frontend/web/js/model/shipping-save-processor/store-delivery.js index 78ada31..0339228 100644 --- a/view/frontend/web/js/model/shipping-save-processor/store-delivery.js +++ b/view/frontend/web/js/model/shipping-save-processor/store-delivery.js @@ -23,7 +23,8 @@ define( 'Magento_Checkout/js/model/payment-service', 'Magento_Checkout/js/model/payment/method-converter', 'Magento_Checkout/js/model/error-processor', - 'Magento_Checkout/js/model/full-screen-loader' + 'Magento_Checkout/js/model/full-screen-loader', + 'Magento_Checkout/js/model/shipping-save-processor/payload-extender' ], function ( ko, @@ -33,7 +34,8 @@ define( paymentService, methodConverter, errorProcessor, - fullScreenLoader + fullScreenLoader, + payloadExtender ) { 'use strict'; @@ -55,6 +57,8 @@ define( } }; + payloadExtender(payload); + fullScreenLoader.startLoader(); return storage.post(