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

[DFC Orders] Updates to backorder on any order amendment #12915

Open
3 tasks
mkllnk opened this issue Oct 15, 2024 · 1 comment
Open
3 tasks

[DFC Orders] Updates to backorder on any order amendment #12915

mkllnk opened this issue Oct 15, 2024 · 1 comment
Assignees

Comments

@mkllnk
Copy link
Member

mkllnk commented Oct 15, 2024

Currently, we amend the backorder when a customer checks out an order or at the end of the order cycle. But there are many more ways a backorder can be influenced, including:

  • A customer amends an order by adjusting quantities.
  • A customer cancels an order.
  • An admin creates an order.
  • An admin amends an order by adding items, removing items or changing quantities.
  • An admin adjusts stock levels.
  • A subscription places an order.

There may be more ways to affect a backorder and it's difficult to catch all cases.

So far, the backordering logic is tailored to the checkout and order cycle close but we need a more general approach to cover all situations.

  • We need to load all line items of the order cycle to find new lines to add to the backorder.
  • We need to load all variants in the order cycle to find out-of-stock items to order.
  • We still need to iterate through all backordered items to check if they are still needed. A product could have been ordered, then cancelled and removed from the order cycle.

Once we have a general method aggregating all backorder information we can then use it various places.

@mkllnk
Copy link
Member Author

mkllnk commented Oct 30, 2024

I think that this work depends on:

When variants were removed from an order cycle and removed from orders then we don't have any way of finding an open backorder associated to the removed variant unless we catch the exact event of removal.

@mkllnk mkllnk moved this from Ready to In progress in DFC Orders Implementation Phase 1 Nov 21, 2024
@mkllnk mkllnk moved this from All the things 💤 to In Progress ⚙ in OFN Delivery board Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
Status: In Progress ⚙
Development

No branches or pull requests

2 participants