nagasurendra commited on
Commit
71bacb0
·
verified ·
1 Parent(s): f7d8140

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -0
app.py CHANGED
@@ -274,6 +274,15 @@ def submit_customization_ingredients():
274
  'Section__c': item.get('section', ''),
275
  'Customer_Email__c': customer_email # Store session email
276
  })
 
 
 
 
 
 
 
 
 
277
  logger.debug(f"Created new Cart_Item__c for {item['name']}")
278
  return jsonify({"success": True, "message": f"Processed {len(items)} items"})
279
 
@@ -325,6 +334,14 @@ def submit_customization_ingredients():
325
  'Section__c': menu_item.get('section', ''),
326
  'Customer_Email__c': customer_email # Store session email
327
  })
 
 
 
 
 
 
 
 
328
  logger.debug(f"Created new Cart_Item__c for {menu_item['name']}")
329
  return jsonify({"success": True, "message": "Customization submitted"})
330
 
 
274
  'Section__c': item.get('section', ''),
275
  'Customer_Email__c': customer_email # Store session email
276
  })
277
+ sf.Custom_Dish__c.create({
278
+ 'Name': item['name'],
279
+ 'Price__c': total_price,
280
+ 'Description__c': f"Add-Ons: {ingredient_names}; Instructions: {item.get('instructions', '')}",
281
+ 'Image1__c': item.get('image_url', ''),
282
+ 'Veg_NonVeg__c': item.get('veg_nonveg', ''),
283
+ 'Section__c': item.get('section', '')
284
+ })
285
+
286
  logger.debug(f"Created new Cart_Item__c for {item['name']}")
287
  return jsonify({"success": True, "message": f"Processed {len(items)} items"})
288
 
 
334
  'Section__c': menu_item.get('section', ''),
335
  'Customer_Email__c': customer_email # Store session email
336
  })
337
+ sf.Custom_Dish__c.create({
338
+ 'Name': item['name'],
339
+ 'Price__c': total_price,
340
+ 'Description__c': f"Add-Ons: {ingredient_names}; Instructions: {item.get('instructions', '')}",
341
+ 'Image1__c': item.get('image_url', ''),
342
+ 'Veg_NonVeg__c': menu_item.get('veg_nonveg', ''),
343
+ 'Section__c': menu_item.get('section', '')
344
+ })
345
  logger.debug(f"Created new Cart_Item__c for {menu_item['name']}")
346
  return jsonify({"success": True, "message": "Customization submitted"})
347