feature/selective-checkout #10

Merged
Ghasemi merged 1 commit from feature/selective-checkout into master 2026-09-05 08:16:47 -04:00
Collaborator
No description provided.
ali added 2 commits 2026-09-05 07:57:56 -04:00
checkout() decrements stock_quantity/increments sold_count per order
item, but cancellation never reversed it, so a cancelled order's stock
stayed permanently reduced. Add _restock_order_items(), called from
_transition() on the CANCELLED transition, using F() expressions to
reverse both counters atomically; wrap _transition() itself in
@transaction.atomic so the status change and restock can't partially
apply.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
POST /api/v1/checkout/ always converted the customer's entire
multi-store cart into orders. Add an optional store_uuids field to
CheckoutSerializer — when given, checkout() only processes those
stores' cart groups and only clears their items, leaving the rest of
the cart intact for a later checkout. Omitted, behavior is unchanged
(whole cart checks out).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Ghasemi merged commit 3deb360acb into master 2026-09-05 08:16:47 -04:00
Ghasemi deleted branch feature/selective-checkout 2026-09-05 08:16:47 -04:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: addwin/winofy-backend#10
No description provided.