Closed rahobbs closed 7 years ago
onEnter load cart get items in cart /:userid/cart search for order that is pending (where order status pending and current user id) orderproduct for that order to list all items in cart
if there is no pending, create pending order
get order history /:userid/orderhistory all orders by current user (except pending)
post/add item to cart /:userid/cart search for order that is pending (where order status pending and current user id)
add orderproduct - order id and product id
delete item
put - update quantity
Create a new "pending" order instance if there is not already a pending order instance. This is necessary for the cart.