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 be![PHP shoppging cart folder structure](https://www.wdb24.com/wp-content/uploads/2021/02/php-shopping-cart-folder-structure.jpg)
Shopping 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:
![php shopping cart product listing](https://www.wdb24.com/wp-content/uploads/2021/02/php-shopping-cart-product-listing.jpg)
Product Detail Page :
![php shopping cart single product](https://www.wdb24.com/wp-content/uploads/2021/02/php-shopping-cart-single-product.jpg)
Cart Page:
![php shopping cart page](https://www.wdb24.com/wp-content/uploads/2021/02/php-shopping-cart-page.jpg)
Checkout form Page:
![php shopping cart checkout page](https://www.wdb24.com/wp-content/uploads/2021/02/php-shopping-cart-checkout-page.jpg)
If you people need only html of above cart. Let me know in the comments I will upload it here.