Bug description / how to reproduce
While testing the checkout flow we discovered an issue when continuing from the shipping step to the payment step. This is what we observed, though only occasionally:
- Fill out a valid shipping address.
- Click the button to continue to next step (
#shipping-method-buttons-container .button).
- In the checkout summary observe that postcode and country appear, but all other address fields (name, street, city, phone) are absent.
- Attempting to complete checkout fails due to the address being malformed.
Build / environment
We are currently on beta8 and have reproduced this both on Luma as well as our custom theme.
Findings
My team narrowed it down to being an issue with timing of the estimate-shipping-methods ajax call. estimate-shipping-methods only requires country and postcode and saves the address with only these values. In cases where the bug appeared, this estimate-shipping-methods occurs after the shipping-information, saving the truncated address (bad).
Further digging into when shipping-information is called. In this file a 2s delay is set between calling validation for the shipping address form:
app/code/Magento/Checkout/view/frontend/web/js/model/shipping-rates-validator.js
The bug generally occurs when you proceed through checkout very quickly (form autocompletion helps with this) and you click the continue button within this 2s window, before the shipping-information ajax call is fired.
We have not been able to fully resolve this issue, but we have reduced the likelihood of it occurring by reducing the delay from 2000 to 500.
Bug description / how to reproduce
While testing the checkout flow we discovered an issue when continuing from the shipping step to the payment step. This is what we observed, though only occasionally:
#shipping-method-buttons-container .button).Build / environment
We are currently on beta8 and have reproduced this both on Luma as well as our custom theme.
Findings
My team narrowed it down to being an issue with timing of the
estimate-shipping-methodsajax call.estimate-shipping-methodsonly requires country and postcode and saves the address with only these values. In cases where the bug appeared, thisestimate-shipping-methodsoccurs after theshipping-information, saving the truncated address (bad).Further digging into when
shipping-informationis called. In this file a 2s delay is set between calling validation for the shipping address form:The bug generally occurs when you proceed through checkout very quickly (form autocompletion helps with this) and you click the
continuebutton within this 2s window, before theshipping-informationajax call is fired.We have not been able to fully resolve this issue, but we have reduced the likelihood of it occurring by reducing the delay from
2000to500.