-
Notifications
You must be signed in to change notification settings - Fork 0
/
TODO.txt
70 lines (51 loc) · 2.34 KB
/
TODO.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
1. Split cart table into two.
orders
id (primary key, unique identifier for each order)
cart_id (foreign key referencing the cart table)
user_id (foreign key referencing the users table)
subtotal
total_price
total_taxes
total_shipping
total_discount_percentage
created_at (timestamp for when the order was placed)
updated_at (timestamp for when the order was last updated)
order_items
id (primary key, unique identifier for each order item)
cart_id (foreign key referencing the cart table)
dish_id (foreign key referencing the dishes table)
quantity
price_at_purchase (price of the dish when it was added to the cart)
created_at (timestamp for when the item was added to the cart)
updated_at (timestamp for when the item was last updated)
2.
2.1
Generate random userId and add to localStorage.
Replace it when user logs in.
Update cart table, change the user ID on cart table.
when should I store the userId in mysql table?
also should I store the email and phone number in local storage until order is placed?
done!
2.2
how to update localStorage when a user logs in?
ans. delete it
done!
Done: Also fixed to show cart always, regardless of whether user has logged in or not.
Done: 3. Cart should be updated with small bubble number. Store the number in local storage.
update cart when userId is unset.
4. Redesign Cart Page so cart groups dishes by restaurant
DONE So need to join tables: cart+dish+restaurant
DONE then need to pass it to frontend {restaurant: {dishes}}
DONE after that write code to iterate through it and make tables.
DONE Fix localStorage Cart Count.
Add an order button and then move all dishes from cart to order table.
NOT POSSIBLE WITHOUT LLC: Implement Stripe. Account is already made so implement the payment gateway.
5. Implement API-Pagination.
6. Randomly Generate data for restaurant.
7. Implement elasticsearch
how to implement delete in orders?
Redundancy is good for performance. Instead of calculation
total items+shipping+taxes everytime, we put total price.
Use Cart table for keeping track of cart items.
Once the user places the order,
then add everything to orderItems and order.