cancel
Showing results for 
Search instead for 
Did you mean: 

Estimate Shipping and Tax

SOLVED

Estimate Shipping and Tax

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?

https://i.stack.imgur.com/43u0K.png

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Estimate Shipping and Tax

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.


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

View solution in original post

1 REPLY 1

Re: Estimate Shipping and Tax

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.


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer