4

We have the following situation in Magento:

  1. Guest customer is about place order.
  2. The customer filled his billing and shipping addresses on checkout page.
  3. The customer reached one of the following checkout steps (shipping methods, payment methods, order review).
  4. The customer decides to edit his cart and goes back to cart page
  5. The customer reaches the checkout page again and he has to fill shipping and billing address.

My question is what is the non programming reason to always start with fresh addresses on checkout page even when a customer filled them already in current checkout session?

It looks that Magento Core Team intentionally wants this effect. But why? Is there an edge case that may cause problems for the customers?

1 Answer 1

4

That is definitely a kind of a bug-feature that was done by core team on purpose, but I don't think that it is done specifically for resetting an address. Might be it was a bug fix of filled in address fields on some blocks, before onepage template has been separated from multi shipping checkout.

But the main point is that address is actually is not reset. Problem lies in the block for address steps, as if customer is not logged it it uses empty new model as data source for address form. That's simple as that. Just add observer on before_to_html for that block and set original quote address into the block and your issue is fixed.

1
  • Can you please explain that where is this line of code where it's using empty new model? I am stuck.
    – Seefan
    Mar 30, 2020 at 7:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.