Pull request commit
eric-delarosa / it202011 Goto Github PK
View Code? Open in Web Editor NEWRestaurant website for Web Development class
Restaurant website for Web Development class
For now limit to 10 most recent orders
For now limit to 10 most recent orders
Product list page will be public
For now limit results to 10 most recent
User will be able to filter results by category
User will be able to filter results by partial matches on the name
User will be able to sort results by price
Any filter applied must abide by the pagination rules
If public, hide email address from other users
Quantity of 0 should also remove from cart
Create an Orders table (id, user_id, created, total_price, address, payment_method)
Payment method will simply record (Cash, Visa, MasterCard, Amex, etc) We will not be recording CC numbers or
anything of that nature, this is just a sample and in real world projects you’d commonly use a third party payment
processor
Create an OrderItems table (id, order_id, product_id, quantity, unit_price)
User will be asked for their Address for shipping purposes
Address form should validate correctly
Order process:
Calculate Cart Items
Verify desired product and desired quantity are available in the Products table
Show an error message and prevent order from going through if something isn’t available
Let the user update their cart and try again
Clearly show what the issue is (which product isn’t available, how much quantity is available if the cart
exceeds it)
Make entry into Orders table
Get last Order ID from Orders table
Copy the cart details into the OrderItems tables with the Order ID from the previous step
Update the Products table Quantity for each item to deduct the Ordered Quantity
Clear out the user’s cart after successful order
Redirect user to Order Confirmation Page
Table should be called Products (id, name, description, category, quantity, created, modified, price, visibility [true, false])
Date Range
Category
List all the items
Show subtotal for each item based on quantity * price
Show total cart value
Will be able to click an item to see more details (Product Details Page)
Cart will be table-based (id, product_id, user_id, desired_quantity, unit_cost, created)
Adding items to Cart will not affect the Product's quantity in the Products table
Any filter/sort applied must abide by the pagination rules
This feature can suffice for the “out of stock” feature if 0 is given
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.