experius / Magento-2-Module-Experius-ExtraCheckoutAddressFields

Add Extra Address Attributes to the Magento 2 Checkout
GNU General Public License v3.0
41 stars 25 forks source link

Will this enable accessing the extra shipping attributes during shipping estimate? #10

Open LiamKarlMitchell opened 5 years ago

LiamKarlMitchell commented 5 years ago

I want to add two fields for lat/long populated by js code from an address lookup service. Which would then be used to display the appropriate shipping options.

I'm using https://github.com/owebia/magento2-module-advanced-shipping-setting which seems to have a sandboxed PHP for the actual shipping method/estimate rules.

I've added my own fields following a blog I saw from experius, and I can see that the estimate code can see the extra attributes on the shipping address but all the extra values are null.

LiamKarlMitchell commented 5 years ago

Does not appear to :(.

The estimate-shipping call is before Place Order is used on the Checkout or Cart.

Need to over-write js file for sending new-account shipping estimate object to include the extra arguments. And then need to change something in the back end to also pass those through to the carrier/shipping method getRates.

I can probably pull it out of $_POST but that seems the wrong way to go about it maybe.

After adding the js mixins the estimate-shipping-methods does include my custom fields, maybe this is from something else however.

But the shipping-information post on next step does not contain the information.