I'm working on Magento 2.2.3
I added the city field in the "Estimate Shipping and Tax" part.
By default, the others field (Country, State and Zip/Postal Code) have the value of the default shipping address of the customer.
Do you know how I can add the value of the city too?
Solved! Go to Solution.
Hello,
you need to edit below file
module-checkout\view\frontend\web\js\view\cart\shipping-estimation.js
where you can find
estimatedAddress = address.isEditable() ? addressConverter.quoteAddressToFormAddressData(address) : { // only the following fields must be used by estimation form data provider 'country_id': address.countryId, region: address.region, 'region_id': address.regionId, postcode: address.postcode };
Same way you can edit your city field.
If it will help you then mark as solution.
Hello,
you need to edit below file
module-checkout\view\frontend\web\js\view\cart\shipping-estimation.js
where you can find
estimatedAddress = address.isEditable() ? addressConverter.quoteAddressToFormAddressData(address) : { // only the following fields must be used by estimation form data provider 'country_id': address.countryId, region: address.region, 'region_id': address.regionId, postcode: address.postcode };
Same way you can edit your city field.
If it will help you then mark as solution.