DSatishchandra commited on
Commit
ac88730
·
verified ·
1 Parent(s): 0e971b5

Delete models/cart.py

Browse files
Files changed (1) hide show
  1. models/cart.py +0 -15
models/cart.py DELETED
@@ -1,15 +0,0 @@
1
- cart = []
2
-
3
- def add_to_cart(name, price):
4
- global cart
5
- cart.append({"Name": name, "Price": price, "Quantity": 1})
6
- return cart
7
-
8
- def view_cart():
9
- global cart
10
- total = sum(float(item["Price"]) * item["Quantity"] for item in cart)
11
- return cart, total
12
-
13
- def clear_cart():
14
- global cart
15
- cart = []