spree icon indicating copy to clipboard operation
spree copied to clipboard

Fix user's shipping & billing address interaction with order

Open mrbrdo opened this issue 4 years ago • 7 comments

There are several issues regarding this, see the individual commits.

This also makes legacy frontend work correctly:

  • when order is created, the billing/shipping address will correctly be assigned to user if he doesn't have an address assigned
  • when a new order is started, it will correctly use the user's billing/shipping address if present

This was quite broken with even a security issue with the unscoped Spree::Address query. I suggest to merge asap due to this.

mrbrdo avatar Mar 12 '22 15:03 mrbrdo

Changes preview:

Legend:

👀 Review pull request on Viezly

viezly[bot] avatar Mar 12 '22 15:03 viezly[bot]

This is tackling simliar problems to my PR here: https://github.com/spree/spree/pull/11606, maybe we want to merge this into one PR?

stefnnn avatar Mar 13 '22 16:03 stefnnn

@stefnnn yes we could. Although your PR was not merged after 2 months. I am afraid the maintainers are sleeping? No point in putting in the work if it will never get merged.

mrbrdo avatar Mar 13 '22 17:03 mrbrdo

@damianlegawiec ping, this is kinda important. Been using these fixes in production for a while now, no issues at all.

mrbrdo avatar Apr 17 '22 00:04 mrbrdo

Updated to correctly determine use_billing? (fixes issue if ship is same as bill and gets updated in checkout form)

mrbrdo avatar May 12 '22 22:05 mrbrdo

@damianlegawiec what do you think?

mrbrdo avatar May 26 '22 23:05 mrbrdo

@damianlegawiec well??

mrbrdo avatar Oct 25 '22 21:10 mrbrdo