From ce1847e06c57c97356de308b672675593acc514f Mon Sep 17 00:00:00 2001 From: giles Date: Tue, 10 Feb 2026 20:49:37 +0000 Subject: [PATCH] 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 --- bp/product/routes.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bp/product/routes.py b/bp/product/routes.py index 48942da..29afff7 100644 --- a/bp/product/routes.py +++ b/bp/product/routes.py @@ -221,6 +221,7 @@ def register(): product_id=product.id, product=product, quantity=count, + market_place_id=getattr(g, "market", None) and g.market.id, ) g.cart.append(ci) g.s.add(ci)