Skip to content

An Amazon-like storefront using MySQL. The app will take in orders from customers and deplete stock from the store's inventory.

Notifications You must be signed in to change notification settings

dara-anya/Bamazon

Repository files navigation

Bamazon

An Amazon-like storefront using MySQL. The app will take in orders from customers and deplete stock from the store's inventory.

How it works

  1. A database containg a products table with 10 items, is created using MySQL.
  2. To start the application, navigate to the Bamazon folder in terminal and type screen shot 2019-03-01 at 10 41 43 pm into the command line.
  3. The application connects the MySQL using the mysql module. screen shot 2019-03-01 at 11 06 28 pm The application now has access to the items in the products table.
  4. The table of all the items will display (see below). The table module was used to display the table in this way.

screen shot 2019-03-01 at 11 20 42 pm

(I created a *for loop* to iterate through all items in the table. I could not figure out how to create one table for all items.)

5. The user will be prompted on the item (by giving the item ID) and quantity of said item that is to be purchased. If the item is not in stock then the following message will display and the application will stop:

screen shot 2019-03-01 at 11 26 05 pm

If the item is in stock then the application will calculate and display the total price of the user's purchase. screen shot 2019-03-01 at 11 24 16 pm

NOTE: If the item is in stock, the stock quantity of that item should be sutracted by the quantity the user purchased and the MySQL table UPDATED. I could not get this functionality to work.

About

An Amazon-like storefront using MySQL. The app will take in orders from customers and deplete stock from the store's inventory.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published