Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -141,7 +141,9 @@ def cart():
|
|
141 |
WHERE Customer_Email__c = '{email}'
|
142 |
""")
|
143 |
cart_items = result.get("records", [])
|
144 |
-
|
|
|
|
|
145 |
|
146 |
return render_template("cart.html", cart_items=cart_items, subtotal=subtotal, customer_email=email)
|
147 |
except Exception as e:
|
|
|
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)
|
149 |
except Exception as e:
|