Estimate Shipping (on cart page) for 4.30 - every keypress in Zip/Postal field gets rates

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 years ago
Maybe it was done by design, but consider the 'expense' of getting shipping methods/rates.  I.e. imagine getting rates 'by warehouse' and also using multiple shipping providers (e.g. UPS and USPS).

1. nopCommerce version 4.30
2. Expected behavior - ??
3. Actual behavior - every keypress when typing in the zip code field makes a call to Get Shipping Options
4. Steps to reproduce the problem
    Select "Estimate Shipping" button on the cart page.  The dialog pops up.
    Enter characters in the zip field (Also changing the Country or State/Province)
    Notice the delay ;)  but better, set a breakpoint in the shipping service to see impact.

Also, if using a provider/carrier that's expecting a valid address, like UPS, you will see errors in the system log - e.g.
Hard error: The requested service is unavailable between the selected locations.
3 years ago
Thanks. Work item here.
Also, you can add any custom validation logic here to reduce requests to 3rd-party services.
3 years ago
Thanks.

Dmitry Kiselev wrote:
...Also, you can add any custom validation logic ... to reduce requests to 3rd-party services.

Yes, "I can", because I'm a developer ;)  But store owners can't.    (Although they can get Shipping Director which can be easily configured for it ;))
3 years ago
I see that this issue was implemented for 4.40, but it does not seem to be working.  (I think 300 ms  default is too short, but)  Even when I change the setting (shippingsettings.requestdelay) to 2000, I see no delay.
3 years ago
New York wrote:
I see that this issue was implemented for 4.40, but it does not seem to be working.  (I think 300 ms  default is too short, but)  Even when I change the setting (shippingsettings.requestdelay) to 2000, I see no delay.


We commited this solution into 4.30-bug-fixes (original 4.30 have the request delay 300 always), it is assumed you run the update script for exists 4.30 database, then 'shippingsettings.requestdelay' setting should be 300 by default otherwise 0. We may need to add this setting to the migration for 4.40 (if value is 0).
Also i set 'shippingsettings.requestdelay' = 2000, i see to the request have delay in browser. (maybe you need to clear your browser cache)
3 years ago
(It was a brand new install.  The setting was defaulted to 300.)
It's my mistake about not seeing a delay.  I saw the 'loading' spinner happen immediately and assumed it was making multiple requests immediately.  But after further testing, I see only one request is actually happening.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.