feat: set market_place_id on CartItem when adding to cart (Phase 3)

Track which market a cart item came from by setting market_place_id
from g.market.id on new CartItem creation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-10 20:49:37 +00:00
parent 98abe5a0de
commit ce1847e06c

View File

@@ -221,6 +221,7 @@ def register():
product_id=product.id, product_id=product.id,
product=product, product=product,
quantity=count, quantity=count,
market_place_id=getattr(g, "market", None) and g.market.id,
) )
g.cart.append(ci) g.cart.append(ci)
g.s.add(ci) g.s.add(ci)