geethareddy commited on
Commit
51d5c5f
·
verified ·
1 Parent(s): 81b5c8a

Update menu.py

Browse files
Files changed (1) hide show
  1. menu.py +3 -3
menu.py CHANGED
@@ -73,7 +73,7 @@ def fetch_menu_data(selected_category, user_email):
73
  item['Allergens__c'] = item.get('Allergens__c', "None listed")
74
  item['is_menu_item'] = True
75
 
76
- # Fetch all Custom_Dish__c records (no time or order limit to show all custom dishes)
77
  custom_dish_query = """
78
  SELECT Name, Price__c, Description__c, Image1__c, Image2__c,
79
  Veg_NonVeg__c, Section__c, Total_Ordered__c
@@ -265,7 +265,7 @@ def get_addons():
265
  "options": options,
266
  "max_selections": addon.get("Max_Selections__c", 1),
267
  "extra_charge": addon.get("Extra_Charge__c", False),
268
- "extra_charge_amount": addon.get("Extra_Charge_Amount__c", 0)
269
  })
270
 
271
  return jsonify({"success": True, "addons": formatted_addons})
@@ -363,7 +363,7 @@ def add_to_cart():
363
  "category": item["Category__c"],
364
  "section": item["Section__c"]
365
  } for item in cart_result.get("records", [])]
366
-
367
  return jsonify({"success": True, "message": "Item added to cart successfully.", "cart": cart})
368
 
369
  except ValueError as e:
 
73
  item['Allergens__c'] = item.get('Allergens__c', "None listed")
74
  item['is_menu_item'] = True
75
 
76
+ # Fetch all Custom_Dish__c records (no restrictions to ensure all custom dishes are shown)
77
  custom_dish_query = """
78
  SELECT Name, Price__c, Description__c, Image1__c, Image2__c,
79
  Veg_NonVeg__c, Section__c, Total_Ordered__c
 
265
  "options": options,
266
  "max_selections": addon.get("Max_Selections__c", 1),
267
  "extra_charge": addon.get("Extra_Charge__c", False),
268
+ "extra_charge_amount": addon.get("Extra_Charge__c", 0)
269
  })
270
 
271
  return jsonify({"success": True, "addons": formatted_addons})
 
363
  "category": item["Category__c"],
364
  "section": item["Section__c"]
365
  } for item in cart_result.get("records", [])]
366
+
367
  return jsonify({"success": True, "message": "Item added to cart successfully.", "cart": cart})
368
 
369
  except ValueError as e: