Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -141,8 +141,8 @@ def cart():
|
|
| 141 |
WHERE Customer_Email__c = '{email}'
|
| 142 |
""")
|
| 143 |
cart_items = result.get("records", [])
|
| 144 |
-
|
| 145 |
-
|
| 146 |
|
| 147 |
|
| 148 |
return render_template("cart.html", cart_items=cart_items, subtotal=subtotal, customer_email=email)
|
|
|
|
| 141 |
WHERE Customer_Email__c = '{email}'
|
| 142 |
""")
|
| 143 |
cart_items = result.get("records", [])
|
| 144 |
+
# Subtotal should be the sum of all item prices in the cart
|
| 145 |
+
subtotal = sum(item['Price__c'] for item in cart_items)
|
| 146 |
|
| 147 |
|
| 148 |
return render_template("cart.html", cart_items=cart_items, subtotal=subtotal, customer_email=email)
|