SathvikGanta commited on
Commit
58036b7
·
verified ·
1 Parent(s): e91c97a

Update components/cart.py

Browse files
Files changed (1) hide show
  1. components/cart.py +4 -5
components/cart.py CHANGED
@@ -1,4 +1,4 @@
1
- cart = [] # Global cart
2
 
3
  def add_to_cart(dish_name, spice_level, extras, instructions, quantity):
4
  """Add selected item to the cart."""
@@ -8,12 +8,11 @@ def add_to_cart(dish_name, spice_level, extras, instructions, quantity):
8
  "Extras": ", ".join(extras) if extras else "None",
9
  "Instructions": instructions,
10
  "Quantity": quantity,
11
- "Price": f"${(quantity * 10.0):.2f}" # Example price
12
  }
13
  cart.append(item)
14
  return cart_data()
15
 
16
  def cart_data():
17
- """Return cart data."""
18
- import pandas as pd
19
- return pd.DataFrame(cart)
 
1
+ cart = [] # Global cart list
2
 
3
  def add_to_cart(dish_name, spice_level, extras, instructions, quantity):
4
  """Add selected item to the cart."""
 
8
  "Extras": ", ".join(extras) if extras else "None",
9
  "Instructions": instructions,
10
  "Quantity": quantity,
11
+ "Price": f"${(quantity * 10.0):.2f}" # Example price calculation
12
  }
13
  cart.append(item)
14
  return cart_data()
15
 
16
  def cart_data():
17
+ """Return the cart as a list of dictionaries."""
18
+ return cart