I am starting a series of tutorials in which we well be building php shopping cart step by step . I will be focusing on front end of shopping cart which will include
- Setup Directory Structure and MYSQL Database
- Display products from database
- Create single product (product description) page
- Add to cart functionality using session
- Update/Delete Product from Cart
- Checkout code with validation
Project name will be Cool T-shirt Shop and I will be using Bootstrap 4 as an UI framework. Add to cart functionality will be based on PHP Session and I will be using PHP PDO for database communication.
Shopping Cart Folder Strucutre:
Folder structure of the shopping cart will beShopping Cart Database Schema:
Database name will be tshirt_cart and it will have 4 tables which are:
- products
- product_images
- orders
- order_details
PHP Shopping Cart Pages:
There will be 5 pages in shopping cart which are:
- Product Listing Page (index.php)
- Product Detail Page (single-product.php)
- Cart Page (cart.php)
- Checkout form Page (checkout.php)
- Thank you Page (thank-you.php)
Product Listing Page:
Product Detail Page :
Cart Page:
Checkout form Page:
If you people need only html of above cart. Let me know in the comments I will upload it here.