Description:
Added the functionality to add a product to an order(aka shopping cart). From the product detail view when the user clicks the 'add to order button', it will add the product to the user's order. I did this by creating a new view add_product_to_order which takes the product id as an argument. It checks to see if the current logged in user has an open order (order that has not been soft deleted and doesn't have a payment type). If there is an open order, it adds the product to it, if not it creates an oder first and then adds the product.
Steps to Test:
Go to a product detail page (localhost:8000/products/1)
Click add product to order.
You should be directed to your shopping cart and see your product.
Description: Added the functionality to add a product to an order(aka shopping cart). From the product detail view when the user clicks the 'add to order button', it will add the product to the user's order. I did this by creating a new view add_product_to_order which takes the product id as an argument. It checks to see if the current logged in user has an open order (order that has not been soft deleted and doesn't have a payment type). If there is an open order, it adds the product to it, if not it creates an oder first and then adds the product.
Steps to Test: Go to a product detail page (localhost:8000/products/1) Click add product to order. You should be directed to your shopping cart and see your product.
Ticket #57