blathering-barnacles / Bangazon-2

Sprint 2
1 stars 1 forks source link

Ticket13 and 12 #46

Closed Kazathur92 closed 5 years ago

Kazathur92 commented 5 years ago

Description:
Added the ability to view categories in drop down from nav bar, when click on a category, that category appears with the products under that category and the amount of products next to it. Also added the ability to click on "ALL" which displays all categories with their products and the amount next to the category names. I also added new column of dateAdded on Product Model so I could filter by date, this means if you pull this down to try it, you might have to delete migrations folder and database and re-make migrations + migrate + modify your sql file so when you insert a new product you insert it with whatever date you want for testing.

Steps to Test:

Link to Feature Ticket:
Ticket 12 Link to Feature Ticket:
Ticket 13

This is what my sql file looks like if you want to test:

INSERT INTO ecomm_customer VALUES (null, '1015 McClurkin Ave', '615-423-0200', '', 1); INSERT INTO ecomm_customer VALUES (null, '105 Lichey Ave', '615-123-0000', '', 2);

INSERT INTO ecomm_product VALUES (null, 'nintendo switch', 'Nashville', 'Nintendo Product', 200, 3, "2019-02-09","", 1, 1); INSERT INTO ecomm_product VALUES (null, 'bicycle', 'dallas', 'Bicycle', 250, 2, "2019-02-09", "", 2, 2); INSERT INTO ecomm_product VALUES (null, "nintendo 3ds", "dallas", "portable gaming system", 150, 1, "2019-02-09","", 1, 2); INSERT INTO ecomm_product VALUES (null, "rubber ducky", "houston", "duck made out of rubber", 5, 10, "2019-02-09","", 3, 1);

INSERT INTO ecomm_productType VALUES (null, 'Electronics', ""); INSERT INTO ecomm_productType VALUES (null, 'Sports', ""); INSERT INTO ecomm_productType VALUES (null, 'Toiletries', "");

INSERT INTO ecomm_paymenttype VALUES (null, 'Southwest Visa', '1234432112344321', '', 1); INSERT INTO ecomm_paymenttype VALUES (null, 'CapOne MasterCard', '1444999922228888', '', 1); INSERT INTO ecomm_paymenttype VALUES (null, 'Chase Visa', '1000033337777222', '', 2); INSERT INTO ecomm_paymenttype VALUES (null, 'BoA MasterCard', '8888888888888888', '', 2);

INSERT INTO ecomm_productorder VALUES (null, '', 1, 2); INSERT INTO ecomm_productorder VALUES (null, '', 2, 1); INSERT INTO ecomm_productorder VALUES (null, '', 2, 3);

INSERT INTO ecomm_order VALUES (null, '', 1, 2); INSERT INTO ecomm_order VALUES (null, '', 2, 4);

Kazathur92 commented 5 years ago

Yes, because the All actually filters through a new column "dateAdded" in the product model, so you will have to re-migrate for this one :(

jessicabarnett8219 commented 5 years ago

👍