Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't fill backorders on incomplete orders (e.g. in abandoned in payment state) #4056

Conversation

sohara
Copy link
Contributor

@sohara sohara commented Dec 5, 2013

Currently the scope used to find inventory doesn't scope to those belonging to orders that are actually completed, so abandoned carts can have the inventory_units filled prior to real orders.

Also, I've changed the ordering to use the order's completed_at timestamp rather that the inventory unit's created_at timestamp. I believe the former is preferable in order to ensure that backorders are filled on a first come, first served basis. Otherwise people who had the item in their cart but didn't complete the order until much later could have their backorders filled prior to those who completed their orders earlier.

This should probably be applied to master and 2-1-stable as well but doesn't yet merge cleanly.

@GeekOnCoffee
Copy link
Contributor

Merged to 2-0-stable.

@radar
Copy link
Contributor

radar commented Dec 6, 2013

Applied to my 2-1-stable and master branches now. The conflict was relatively easy to fix up. Seeing what CI's opinion is of this before merging it to spree/spree.

radar pushed a commit that referenced this pull request Dec 6, 2013
@radar radar closed this in adc8a4f Dec 10, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants