I need to use extra shipping attributes on the estimate shipping post request that gets sent through as a RateRequest to carriers/shipping modules.
Steps to reproduce:
- Add an extra shipping attribute.
- Add/Create a shipping module.
- Output the contents of RateRequest object in your shipping module.
- It will not have the extra attribute in it.
There must be some way to modify the JS to send an extra attribute (new-customer-address.js).
And to modify the PHP to put that attribute into the RateRequest object when using existing address or new address.
I have modified the new-customer-address to a new file using requirejs-config.js
"map": {
"*": {
"Magento_Checkout/js/model/shipping-rate-processor/new-address": "AddressFinder_AddressFinder/js/new-address"
}
}