EasyStore Checkout – Shipping Lookup After Address Correction - Question | JoomShaper

is live, now with multi-currency selling.

EasyStore Checkout – Shipping Lookup After Address Correction

BP

Bruce Paine

EasyStore 2 weeks ago

Hello Joomshaper Support Team,

A further issue has come to light while continuing development of my custom shipping plugin.

During checkout, the shipping lookup is triggered when the customer changes the country, region/state, city or postcode. However, changes to the street address, second address line or suburb do not appear to trigger another shipping lookup.

This can cause a significant problem when the shipping lookup identifies an issue with the address.

For example, if a customer submits an address without a suburb, my shipping plugin will return a status indicating that the suburb is required. The customer can then correct the address by entering their suburb, but EasyStore does not appear to re-run the shipping lookup.

The customer can therefore be left with the previous "suburb required" message (triggered by my shipping plugin) still displayed. If they try clicking Proceed to Payment again, nothing happens because the underlying shipping information has not been re-evaluated. At that point, a customer may reasonably conclude that something is wrong with the checkout and abandon the order.

The same situation can occur if a customer initially enters a misspelt street or suburb and then corrects it.

Would you consider this expected behaviour, or could the shipping lookup be triggered when any relevant part of the shipping address is changed, including the street address and suburb?

Alternatively, if automatic re-checking is not appropriate, perhaps a "Re-check shipping address" option could be provided to allow the customer to explicitly request another shipping lookup.

I would be interested to hear your thoughts on the best way to handle this within EasyStore.

Thanks,

Bruce

0
5 Answers
Ziaul Kabir
Ziaul Kabir
Accepted Answer
Support Agent 2 weeks ago #233151

Hi Bruce,

Thank you for the detailed testing and for confirming this on a clean 2.1.0 install — your findings are correct.

In EasyStore 2.1.0, the checkout re-runs the shipping lookup only on country, region/state, city and postcode changes. Address Line 1 and Address Line 2 are bound without any change handler, and the debounced lookup routine is wired only to state, city and postcode, so editing the address lines does not trigger a new lookup.

I can confirm this has since been addressed in a newer EasyStore build: the checkout now has watchers on Address Line 1 and Address Line 2 that call the same debounced shipping-lookup routine, so a change to either field triggers a fresh checkout.getShipping request automatically. This will be included in an upcoming release.

Regards,

0
BP
Bruce Paine
Accepted Answer
2 weeks ago #233180

That is great news, thank you. I will look forward to that future release.

0
Ziaul Kabir
Ziaul Kabir
Accepted Answer
Support Agent 2 weeks ago #233136

Hi Bruce,

Thanks for reaching out to us.

In current EasyStore versions, the checkout re-runs the shipping lookup whenever any part of the shipping address changes — country, address line 1, address line 2, city, postcode and state — each on a short debounce. A customer entering a missing suburb or correcting a street should trigger a fresh lookup automatically, and the shipping methods (or the resulting message) are re-evaluated at that point.

If address-line or suburb changes are not re-triggering the lookup on your site, you may be on an earlier EasyStore build where only country, state, city and postcode were watched. Could you let us know which EasyStore version you are running so we can confirm the behaviour on your side?

Regarding the stale message and "Proceed to Payment" not responding: the message you are showing for the "suburb required" case is produced by your modifications to CheckoutController.php and the checkout JavaScript. EasyStore has no knowledge of that message, so it will not clear or re-evaluate it when the address changes. Your custom code would need to reset that state each time the relevant address fields change so the message is cleared once the lookup succeeds.

We have noted your suggestions for triggering the lookup on all address fields and for an explicit "Re-check shipping address" option, and will pass them to the development team for consideration.

Thanks,

0
BP
Bruce Paine
Accepted Answer
2 weeks ago #233144

Hi Ziaul

Thanks for your quick response.

I'm running EasyStore 2.1.0, which your website identifies as the current version. I've checked the original, unmodified checkout.site.js from that installation. In that code, debouncedUpdateShipping() watches only state, city and postcode, and there are no handlers that call it when address line 1 or address line 2 changes. The address-line parameters currently present in my site's version were added by me as part of an earlier customisation.

Could you point me to the code in the current EasyStore version that implements the address-line re-triggering you describe?

Regards, Bruce

0
BP
Bruce Paine
Accepted Answer
2 weeks ago #233146

By the way, I have now tested this on a completely fresh EasyStore 2.1.0 installation, with no custom shipping plugin or checkout modifications. The shipping lookup triggers when country/region/city/postcode change, but does not trigger when Address Line 1 or Address Line 2 changes.

0