From efe769a0fcc817c42e2b5dea783a516704912f41 Mon Sep 17 00:00:00 2001 From: giles Date: Tue, 10 Feb 2026 01:16:00 +0000 Subject: [PATCH] fix: add cart services stub for product blueprint dependency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Product routes import total() from cart.services — provide a minimal copy so the market image can start independently. Co-Authored-By: Claude Opus 4.6 --- bp/cart/__init__.py | 0 bp/cart/services/__init__.py | 1 + bp/cart/services/total.py | 6 ++++++ 3 files changed, 7 insertions(+) create mode 100644 bp/cart/__init__.py create mode 100644 bp/cart/services/__init__.py create mode 100644 bp/cart/services/total.py diff --git a/bp/cart/__init__.py b/bp/cart/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/bp/cart/services/__init__.py b/bp/cart/services/__init__.py new file mode 100644 index 0000000..80dd875 --- /dev/null +++ b/bp/cart/services/__init__.py @@ -0,0 +1 @@ +from .total import total diff --git a/bp/cart/services/total.py b/bp/cart/services/total.py new file mode 100644 index 0000000..15e074f --- /dev/null +++ b/bp/cart/services/total.py @@ -0,0 +1,6 @@ +def total(cart): + return sum( + (item.product.special_price or item.product.regular_price) * item.quantity + for item in cart + if (item.product.special_price or item.product.regular_price) is not None + )