Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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()) #
|
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)
|