Update app.py
Browse files
app.py
CHANGED
@@ -271,7 +271,7 @@ def submit_customization_ingredients():
|
|
271 |
total_price = (base_price * quantity) + addons_price
|
272 |
|
273 |
# Check if item already exists in the cart for the user based on Customer_Email__c and Item Name
|
274 |
-
existing_item = sf.
|
275 |
|
276 |
if existing_item: # If the item exists, update it
|
277 |
item_id = existing_item[0]['Id']
|
|
|
271 |
total_price = (base_price * quantity) + addons_price
|
272 |
|
273 |
# Check if item already exists in the cart for the user based on Customer_Email__c and Item Name
|
274 |
+
existing_item = sf.query(f"SELECT Id, Quantity__c, Add_Ons__c, Instructions__c, Price__c FROM Cart_Item__c WHERE Customer_Email__c = '{customer_email}' AND Name = '{item['name']}' LIMIT 1")
|
275 |
|
276 |
if existing_item: # If the item exists, update it
|
277 |
item_id = existing_item[0]['Id']
|