BootstrapTheme icon indicating copy to clipboard operation
BootstrapTheme copied to clipboard

Field `differentShippingAddress` is mistakenly reset

Open mdevlamynck opened this issue 4 years ago • 0 comments

There is a subtle bug in the checkout address page. If:

  • first the differentShippingAddress checkbox is checked,
  • second a billing address is selected in the address book,
  • then the shipping address is ignored (and on submission Sylius sets it to the billing address).

When selecting the address in the address book in the billing address form, the form is reset in this line. Since the field differentShippingAddress is in the billing form block it is also reset. The consequence is that when submitting the form, Sylius considers that the shipping address is the same as the billing address (and ignores the shipping address fields even if filled) because it considers that differentShippingAddress is unchecked.

mdevlamynck avatar Sep 15 '21 18:09 mdevlamynck