Rammohan0504 commited on
Commit
0e0443c
·
verified ·
1 Parent(s): f029c47

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -1122,7 +1122,7 @@ def add_to_cart():
1122
 
1123
  try:
1124
  # Convert item_price to a float after removing any non-numeric characters (e.g., "$")
1125
- item_price = float(item_price.replace('$', '').strip()) # Ensure it's a numeric value
1126
 
1127
  # Calculate addons price: Treat addon prices as strings too and convert them to numbers
1128
  addons_price = sum(float(addon['price'].replace('$', '').strip()) for addon in addons)
 
1122
 
1123
  try:
1124
  # Convert item_price to a float after removing any non-numeric characters (e.g., "$")
1125
+ item_price = float(item_price.replace('$', '').strip()) # Convert price to numeric value
1126
 
1127
  # Calculate addons price: Treat addon prices as strings too and convert them to numbers
1128
  addons_price = sum(float(addon['price'].replace('$', '').strip()) for addon in addons)