Spaces:
Sleeping
Sleeping
File size: 556 Bytes
5242734 06b3f12 5242734 06b3f12 5242734 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
cart = [] # Global cart
def add_to_cart(dish_name, spice_level, extras, instructions, quantity):
"""Add selected item to the cart."""
item = {
"Dish": dish_name,
"Spice Level": spice_level,
"Extras": ", ".join(extras) if extras else "None",
"Instructions": instructions,
"Quantity": quantity,
"Price": f"${(quantity * 10.0):.2f}" # Example price
}
cart.append(item)
return cart_data()
def cart_data():
"""Return cart data."""
import pandas as pd
return pd.DataFrame(cart)
|