-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a payload extender to the default shipping-save-processor
This will allow third party extensions to modify the payload for the shipping address selection process, with the goal being the easy addition of extension_attributes with as few extension conflicts as possible. By separating this out into it's own model (as opposed to including it in the result of the processor return), non-default processors will also be able to utilize it.
- Loading branch information
Navarr Barnier
authored and
Navarr Barnier
committed
Sep 22, 2017
1 parent
ecefd85
commit 9fc22ff
Showing
2 changed files
with
15 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
...e/Magento/Checkout/view/frontend/web/js/model/shipping-save-processor/payload-extender.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
define([], function () { | ||
'use strict'; | ||
|
||
return function (payload) { | ||
payload.addressInformation['extension_attributes'] = {}; | ||
|
||
return payload; | ||
}; | ||
}); |