As I have been working some issues related to shipping I am creating this issue report as place to remember some things for implementation into a new shipping component.
Shipping rates should be recalculated only when inputs to the specific rates are changed. That means don't recalculate a weight based rate if the zip code changes, unless zip code also changes.
Add non address checkout and customer fields to available rate dependencies. Availability of some shipping rates require things other than addresses. For example, some fedex rates require a valid destination phone number.
The shipping quote region of the checkout form should be separately computable and themable. This will allow it to be updated when shipping input parameters change without refreshing the entire page, just like all of the other information on the checkout page.
The customer meta update notification hooks being used in 3.8.14 to clear shipping quotes can have their logic expanded to be more precise. Inline TODO: notes have been placed in cart.class.php and customer-ajax.php to this effect.
The 'lock_tax" option us checked several places in the code but is not set anywhere. It is likely that the option and the code related to it need to be removed and the option properly deprecated.
in the AJAX response for the checkout page only the fields that have changed should be recomputed and sent. Should help performance on the backend and improve the visuals on the checkout page when all fields are not being changed on every AJAX request.
Shipping rates are being recalculated between 5 and 9 times per page view. Obviously this is a waste of resources under normal circumstances. But when shipping rates are calculated via web, as is becoming more common, services this can be especially slow, and could adversely impact a third-party server.
some shipping modules have their own internal cache for results. These internal caches should be unnecessary and removed if the recalculation is only done when necessary. Audit internal shipping methods.
When countries without regions are displayed the label for the field where the region is typed in defaults to "State". Localities use use different names for this field. State is used in the USA, Province in Canada, County in other countries and I am sure there are more. We shoul support pulling that label from our built in database.
While addressing several of the shipping same as billing issues and shipping fields not updating several javascript functions are no longer called. Stubs have been left in their place in case other javascript is calling the routines. As part of merging the new theme engine these stub functions should be removed and officially deprecated.
As I have been working some issues related to shipping I am creating this issue report as place to remember some things for implementation into a new shipping component.