diff --git a/backend/product-mock-service/product_list.json b/backend/product-mock-service/product_list.json index b9edf873..10328fcd 100644 --- a/backend/product-mock-service/product_list.json +++ b/backend/product-mock-service/product_list.json @@ -1,19 +1,20 @@ [ { - "category": "fruit", + "category": "LED_Driving_Lights", "createdDate": "2017-04-17T01:14:03 -02:00", - "description": "Culpa non veniam deserunt dolor irure elit cupidatat culpa consequat nulla irure aliqua.", + "description": "the quality and performance of our LED Light bars surpass that of the most respected players in the industry.", "modifiedDate": "2019-03-13T12:18:27 -01:00", - "name": "packaged strawberries", + "name": "LED_Light_Bars", "package": { "height": 948, "length": 455, "weight": 54, "width": 905 }, - "pictures": [ - "http://placehold.it/32x32" - ], + "pictures": + "https://d18mx5gr4fiw2a.cloudfront.net/LED+Light+Bars.png" + + , "price": 716, "productId": "4c1fadaa-213a-4ea8-aa32-58c217604e3c", "tags": [ @@ -25,20 +26,20 @@ ] }, { - "category": "sweets", + "category": "LED_Driving_Lights", "createdDate": "2017-04-06T06:21:36 -02:00", - "description": "Dolore ipsum eiusmod dolore aliquip laborum laborum aute ipsum commodo id irure duis ipsum.", + "description": "Our Type-X LED Driving Lights are the very best representation of our brands spirit and culture", "modifiedDate": "2019-09-21T12:08:48 -02:00", - "name": "candied prunes", + "name": "LED_Spot_Lights", "package": { "height": 329, "length": 179, "weight": 293, "width": 741 }, - "pictures": [ - "http://placehold.it/32x32" - ], + "pictures": + "https://d18mx5gr4fiw2a.cloudfront.net/LED+Spot+Light.png" + , "price": 35, "productId": "d2580eff-d105-45a5-9b21-ba61995bc6da", "tags": [ @@ -50,20 +51,20 @@ ] }, { - "category": "fruit", + "category": "LED_Work_Lights", "createdDate": "2017-03-17T03:06:53 -01:00", - "description": "Reprehenderit aliquip consequat quis excepteur et et esse exercitation adipisicing dolore nulla consequat.", + "description": "Stellar LED Camping Lantern", "modifiedDate": "2019-11-25T12:32:49 -01:00", - "name": "fresh prunes", + "name": "Work&Task_Lights", "package": { "height": 736, "length": 567, "weight": 41, "width": 487 }, - "pictures": [ - "http://placehold.it/32x32" - ], + "pictures": + "https://d18mx5gr4fiw2a.cloudfront.net/Lantern.png" + , "price": 2, "productId": "a6dd7187-40b6-4cb5-b73c-aecd655c6d9a", "tags": [ @@ -75,20 +76,20 @@ ] }, { - "category": "vegetable", + "category": "LED_Work_Lights", "createdDate": "2018-07-17T02:14:55 -02:00", - "description": "Minim qui elit dolor est commodo excepteur ea voluptate eu dolor culpa magna.", + "description": "Whether you're a professional or simply boating for recreation, our all new Marine LED range is designed to allow you to make the most of your time on the water.", "modifiedDate": "2019-09-05T03:36:34 -02:00", - "name": "packaged tomatoes", + "name": "Marine_Lights", "package": { "height": 4, "length": 756, "weight": 607, "width": 129 }, - "pictures": [ - "http://placehold.it/32x32" - ], + "pictures": + "https://d18mx5gr4fiw2a.cloudfront.net/Marine+Light.png" + , "price": 97, "productId": "c0fbcc6b-7a70-41ac-aac4-f8fd237dc62e", "tags": [ @@ -100,20 +101,20 @@ ] }, { - "category": "vegetable", + "category": "Driving_Light_Accesories", "createdDate": "2017-07-25T12:00:11 -02:00", - "description": "Labore dolore velit mollit aute qui magna elit excepteur officia cupidatat ea ea aliqua.", + "description": "Brackets & Mounts for effortlessly mounting your LED Light Bar and or 4x4 Driving Spot Lights.", "modifiedDate": "2019-10-04T06:32:14 -02:00", - "name": "fresh tomatoes", + "name": "Bull_Bar_Brackets", "package": { "height": 881, "length": 252, "weight": 66, "width": 431 }, - "pictures": [ - "http://placehold.it/32x32" - ], + "pictures": + "https://d18mx5gr4fiw2a.cloudfront.net/Bull+Bar+brackets.png" + , "price": 144, "productId": "cb40c919-033a-47d6-8d00-1d73e2df20fe", "tags": [ @@ -125,20 +126,21 @@ ] }, { - "category": "vegetable", + "category": "Driving_Light_Accesories", "createdDate": "2017-01-07T05:28:03 -01:00", - "description": "Ad eiusmod cupidatat duis dolor mollit labore mollit eu.", + "description": "Whether your look for covers, colour rings or an anti-theft system - we've got you covered.", "modifiedDate": "2019-04-03T10:36:25 -02:00", - "name": "fresh lettuce", + "name": "Optional Accesories", "package": { "height": 813, "length": 932, "weight": 457, "width": 436 }, - "pictures": [ - "http://placehold.it/32x32" - ], + "pictures": + "https://d18mx5gr4fiw2a.cloudfront.net/Optional+Accesories.png" + + , "price": 51, "productId": "12929eb9-3eb7-4217-99e4-1a39c39217b6", "tags": [ @@ -150,20 +152,20 @@ ] }, { - "category": "meat", + "category": "Switches", "createdDate": "2018-12-03T12:33:44 -01:00", - "description": "Amet cupidatat anim ipsum pariatur sit eu.", + "description": "Switch Fascia panel to suit TOYOTA 70 SERIES LANDCRUISER.", "modifiedDate": "2019-04-17T06:31:47 -02:00", - "name": "packaged steak", + "name": "Switch Fascia", "package": { "height": 707, "length": 417, "weight": 491, "width": 549 }, - "pictures": [ - "http://placehold.it/32x32" - ], + "pictures": + "https://d18mx5gr4fiw2a.cloudfront.net/Switch+Fascia.png" + , "price": 894, "productId": "9fd9ef32-493f-4188-99f5-3aa809aa4fa9", "tags": [ @@ -175,20 +177,20 @@ ] }, { - "category": "vegetable", + "category": "Switches", "createdDate": "2017-04-27T06:48:08 -02:00", - "description": "Labore est aliqua laborum ea laboris voluptate cillum aute duis occaecat.", + "description": "The ultimate finishing touch for any driving lights or work light installation. ", "modifiedDate": "2019-11-01T10:23:57 -01:00", - "name": "fresh lettuce", + "name": "Nissan Switches", "package": { "height": 21, "length": 311, "weight": 817, "width": 964 }, - "pictures": [ - "http://placehold.it/32x32" - ], + "pictures": + "https://d18mx5gr4fiw2a.cloudfront.net/Nissan+Switches.png" + , "price": 452, "productId": "20db6331-1084-48ff-8c4f-c1d98a6a1aa4", "tags": [ @@ -200,20 +202,20 @@ ] }, { - "category": "sweet", + "category": "Switches", "createdDate": "2017-11-24T04:01:33 -01:00", - "description": "Fugiat sunt in eu eu occaecat.", + "description": "The robust switching action makes them an ideal option for a universal application like camper trailers, rear drawer systems or to achieve that comp' truck vibe in your cabin.", "modifiedDate": "2019-05-19T05:53:56 -02:00", - "name": "half-eaten cake", + "name": "Universal_Switches", "package": { "height": 337, "length": 375, "weight": 336, "width": 1 }, - "pictures": [ - "http://placehold.it/32x32" - ], + "pictures": + "https://d18mx5gr4fiw2a.cloudfront.net/Universal+Switches.png" + , "price": 322, "productId": "8c843a54-27d7-477c-81b3-c21db12ed1c9", "tags": [ @@ -225,20 +227,20 @@ ] }, { - "category": "dairy", + "category": "Wiring&Electrical", "createdDate": "2018-05-29T11:46:28 -02:00", - "description": "Aliqua officia magna do ipsum laboris anim magna nulla sit labore nulla qui duis.", + "description": "AOur plug and play high beam piggyback adaptors means no more soldering, crimping or cutting factory wires.", "modifiedDate": "2019-05-29T05:33:49 -02:00", - "name": "leftover cheese", + "name": "High_Beam_Adaptors", "package": { "height": 267, "length": 977, "weight": 85, "width": 821 }, - "pictures": [ - "http://placehold.it/32x32" - ], + "pictures": + "https://d18mx5gr4fiw2a.cloudfront.net/Adapters+high+beam.png" + , "price": 163, "productId": "8d2024c0-6c05-4691-a0ff-dd52959bd1df", "tags": [ @@ -250,20 +252,20 @@ ] }, { - "category": "bakery", + "category": "Wiring&Electrical", "createdDate": "2018-09-22T05:22:38 -02:00", - "description": "Ullamco commodo cupidatat reprehenderit eu sunt.", + "description": "Driving Light wiring harnesses are truly plug and play. Compatible with both positive and negative switched vehicles..", "modifiedDate": "2019-03-11T06:10:38 -01:00", - "name": "fresh croissants", + "name": "Wiring_Kits", "package": { "height": 122, "length": 23, "weight": 146, "width": 694 }, - "pictures": [ - "http://placehold.it/32x32" - ], + "pictures": + "https://d18mx5gr4fiw2a.cloudfront.net/Wiring+kit.png" + , "price": 634, "productId": "867ecb2b-ef08-446e-8360-b63f60969e3d", "tags": [ @@ -275,20 +277,20 @@ ] }, { - "category": "meat", + "category": "Wiring&Electrical", "createdDate": "2018-09-12T07:24:46 -02:00", - "description": "Eu ullamco irure qui labore qui duis mollit eiusmod adipisicing fugiat adipisicing nostrud ut non.", + "description": "our extensive range of dual battery gauges, USB switch holders and gauges are available in a variety of forms factors to suit your application.", "modifiedDate": "2019-10-28T01:25:50 -01:00", - "name": "packaged ham", + "name": "Electronic_Accesories", "package": { "height": 902, "length": 278, "weight": 775, "width": 31 }, - "pictures": [ - "http://placehold.it/32x32" - ], + "pictures": + "https://d18mx5gr4fiw2a.cloudfront.net/Electronic+accessories.png" + , "price": 77, "productId": "684011fc-ecfd-4557-a6df-9fc977365826", "tags": [ @@ -300,20 +302,20 @@ ] }, { - "category": "bakery", + "category": "LED_Conversions", "createdDate": "2017-06-12T09:15:36 -02:00", - "description": "Eu culpa nulla est et anim sint amet.", + "description": "We have a full range of pure white LED globes are From parker, DRL, tail lights, reverse lights or license plate bulbs..", "modifiedDate": "2019-08-22T04:22:39 -02:00", - "name": "fresh bread", + "name": "Exterior_Globes", "package": { "height": 551, "length": 976, "weight": 47, "width": 846 }, - "pictures": [ - "http://placehold.it/32x32" - ], + "pictures": + "https://d18mx5gr4fiw2a.cloudfront.net/Exterior+Globes.png" + , "price": 805, "productId": "b027697d-a070-4c8f-8b9a-b8c80b2eb0ba", "tags": [ @@ -325,20 +327,20 @@ ] }, { - "category": "sweet", + "category": "LED_Conversions", "createdDate": "2018-09-06T06:03:43 -02:00", - "description": "Mollit proident aliquip consectetur irure qui veniam laboris aliqua proident id fugiat esse nulla.", + "description": "It starts with the highest lumen density LED emitters", "modifiedDate": "2019-10-16T10:53:33 -02:00", - "name": "candied strawberries", + "name": "Headlight_Conversion", "package": { "height": 55, "length": 32, "weight": 661, "width": 694 }, - "pictures": [ - "http://placehold.it/32x32" - ], + "pictures": + "https://d18mx5gr4fiw2a.cloudfront.net/Headlight+conversion.png" + , "price": 283, "productId": "7e0dbfa9-a672-4987-a26c-f601d177463a", "tags": [ @@ -350,20 +352,20 @@ ] }, { - "category": "bakery", + "category": "LED_Conversions", "createdDate": "2017-07-23T12:27:34 -02:00", - "description": "Ex non proident et eiusmod et elit est exercitation anim qui ullamco elit.", + "description": "LED Fog Lights are not only a sleek visual upgrade to your car or 4x4, but they also offer improved safety by ensuring your car remains visible to other road users..", "modifiedDate": "2019-09-04T08:25:44 -02:00", - "name": "fresh pie", + "name": "Fog_Light_Kits", "package": { "height": 718, "length": 59, "weight": 18, "width": 962 }, - "pictures": [ - "http://placehold.it/32x32" - ], + "pictures": + "https://d18mx5gr4fiw2a.cloudfront.net/Fog+Light+kit.png" + , "price": 646, "productId": "d1d527b8-9cef-4e97-a873-22236f3ee289", "tags": [ @@ -375,20 +377,20 @@ ] }, { - "category": "vegetable", + "category": "LED_Conversions", "createdDate": "2018-11-08T04:08:28 -01:00", - "description": "Pariatur deserunt nostrud cupidatat ut officia voluptate adipisicing mollit sunt cillum quis magna dolore aute.", + "description": "Adaptors to ease your work.", "modifiedDate": "2019-10-11T10:28:49 -02:00", - "name": "packaged lettuce", + "name": "Adaptors& Canbus", "package": { "height": 81, "length": 57, "weight": 653, "width": 367 }, - "pictures": [ - "http://placehold.it/32x32" - ], + "pictures": + "https://d18mx5gr4fiw2a.cloudfront.net/Adapters+Canbus.png" + , "price": 197, "productId": "11663d33-e54d-49da-ba6f-44d016ecde7e", "tags": [ @@ -400,20 +402,20 @@ ] }, { - "category": "meat", + "category": "LED_Conversions", "createdDate": "2018-09-28T04:01:24 -02:00", - "description": "Dolore nulla laboris incididunt laborum.", + "description": "Puddle light| Land Rover.", "modifiedDate": "2019-08-05T01:06:02 -02:00", - "name": "leftover ham", + "name": "LED_Assemblies", "package": { "height": 246, "length": 639, "weight": 354, "width": 953 }, - "pictures": [ - "http://placehold.it/32x32" - ], + "pictures": + "https://d18mx5gr4fiw2a.cloudfront.net/LED+Assemblies.png" + , "price": 728, "productId": "e173d669-b449-4226-af2e-128142abdd30", "tags": [ @@ -425,20 +427,20 @@ ] }, { - "category": "dairy", + "category": "LED_Conversions", "createdDate": "2018-08-23T06:31:47 -02:00", - "description": "Pariatur mollit voluptate enim qui pariatur deserunt elit.", + "description": "From festoon bulbs, to wedge types - We stock every conceivable LED bulb you're going to need to increase the brightness of your car or 4wd interior.", "modifiedDate": "2019-10-02T10:50:16 -02:00", - "name": "fresh milk", + "name": "Interior_Globes", "package": { "height": 576, "length": 948, "weight": 535, "width": 646 }, - "pictures": [ - "http://placehold.it/32x32" - ], + "pictures": + "https://d18mx5gr4fiw2a.cloudfront.net/Interior+Globes.png" + , "price": 164, "productId": "2a5b681c-ec7f-4bd4-a51e-57a5b6591f7f", "tags": [ @@ -450,20 +452,21 @@ ] }, { - "category": "vegetable", + "category": "HID_Bulbs", "createdDate": "2018-02-21T01:55:54 -01:00", - "description": "Consectetur laborum ipsum ad laboris.", + "description": "The very best HIDs start with the very best components.", "modifiedDate": "2019-02-23T08:50:01 -01:00", - "name": "half-eaten lettuce", + "name": "HID_Bulb_Kit", "package": { "height": 348, "length": 119, "weight": 723, "width": 44 }, - "pictures": [ - "http://placehold.it/32x32" - ], + "pictures": + "https://d18mx5gr4fiw2a.cloudfront.net/HID+bulb+kit.png" + + , "price": 583, "productId": "de979b05-9d71-4c7e-b10f-636332ccb6c1", "tags": [ @@ -475,20 +478,20 @@ ] }, { - "category": "meat", + "category": "Apparel&Merchandise", "createdDate": "2017-05-14T03:39:21 -02:00", - "description": "Aliqua tempor irure qui consectetur exercitation culpa minim magna laboris ex pariatur elit culpa.", + "description": "In our opinion, the most comfortable wardrobe items of all time are humble hoodies and sweatshirts. .", "modifiedDate": "2019-11-24T02:23:27 -01:00", - "name": "fresh steak", + "name": "TEE|Black|Smiley", "package": { "height": 328, "length": 7, "weight": 439, "width": 747 }, - "pictures": [ - "http://placehold.it/32x32" - ], + "pictures": + "https://d18mx5gr4fiw2a.cloudfront.net/TEE+Black.png" + , "price": 996, "productId": "aa91060a-3601-4cb8-a2cc-025d09c7a9b7", "tags": [ diff --git a/backend/shopping-cart-service/checkout_cart.py b/backend/shopping-cart-service/checkout_cart.py index 5d5ee86c..39e15c4c 100644 --- a/backend/shopping-cart-service/checkout_cart.py +++ b/backend/shopping-cart-service/checkout_cart.py @@ -47,10 +47,10 @@ def lambda_handler(event, context): cart_items = response.get("Items") # batch_writer will be used to update status for cart entries belonging to the user - with table.batch_writer() as batch: - for item in cart_items: + #with table.batch_writer() as batch: + # for item in cart_items: # Delete ordered items - batch.delete_item(Key={"pk": item["pk"], "sk": item["sk"]}) + # batch.delete_item(Key={"pk": item["pk"], "sk": item["sk"]}) metrics.add_metric(name="CartCheckedOut", unit="Count", value=1) logger.info({"action": "CartCheckedOut", "cartItems": cart_items}) diff --git a/frontend/src/App.vue b/frontend/src/App.vue index ba44b8f8..6df0b915 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -4,12 +4,13 @@ - DEMO + ANYCOMPANY_LED Store + Sign In
@@ -62,7 +63,7 @@ export default { }, toggleDrawer() { this.drawer = !this.drawer; - } + } } }; diff --git a/frontend/src/components/Product.vue b/frontend/src/components/Product.vue index 72962c2a..66ad46dc 100644 --- a/frontend/src/components/Product.vue +++ b/frontend/src/components/Product.vue @@ -12,6 +12,10 @@

"{{product.description}}"

+ +

{{product.pictures}}

+ +

${{getPrice(product)}}

@@ -47,6 +51,10 @@ export default { return 0; } }, + getimage(product) + { + return product.pictures; + }, addProductToCart(product) { this.$store.dispatch("addToCart", product); }, diff --git a/frontend/src/views/Home.vue b/frontend/src/views/Home.vue index ac46d085..ec856c7b 100644 --- a/frontend/src/views/Home.vue +++ b/frontend/src/views/Home.vue @@ -3,6 +3,7 @@ +