A simple PHP-based shopping cart web application for a local artisan store. This project allows users to browse products, add them to a cart, and complete a checkout process. It uses PHP, MySQL, and Bootstrap for styling.
- Browse products with images and descriptions
- Add products to a shopping cart
- Update quantities or remove items from the cart
- Checkout with user details (name, email, address, etc.)
- Order summary and confirmation
- Responsive UI with Bootstrap
Screenshots of the application can be found in the ScreenShots/ directory:
scrnshot_1.png- Home/Product listing pagescrnshot_2.png- Product details pagescrnshot_3.png- Cart viewscrnshot_4.png- Checkout/Order confirmation
- PHP 5.4+ (with mysqli extension)
- MySQL Server
- Web server (e.g., Apache)
-
Clone or Download the Repository
git clone <repo-url> -
Database Setup
- Import the SQL file
db/db_shopping_cart.sqlinto your MySQL server. This will create the required database and tables, and insert sample products. - Example using phpMyAdmin or MySQL CLI:
mysql -u root -p < db/db_shopping_cart.sql
- Import the SQL file
-
Configure Database Connection
- Edit
config.phpif your MySQL credentials differ from the default (root/no password).
- Edit
-
Place Images
- Product images are stored in the
images/directory. Ensure the images referenced in the database exist in this folder.
- Product images are stored in the
-
Run the Application
- Place the project folder in your web server's root directory (e.g.,
htdocsfor XAMPP). - Access the app via
http://localhost/LocalArtisan-main/index.php
- Place the project folder in your web server's root directory (e.g.,
index.php- Product listing (home page)view_details.php- Product details and add to cartview_cart.php- View and update cartcheckout.php- Enter delivery details and place ordercomplete.php- Order confirmationcart.class.php- Cart management classconfig.php- Database connectiondb/db_shopping_cart.sql- Database schema and sample dataimages/- Product imagesScreenShots/- Application screenshots
The database includes the following tables:
products(PID, PRODUCT, PRICE, IMAGE, DESCRIPTION)users(UID, NAME, CONTACT, ADDRESS, CITY, PINCODE, EMAIL)orders(OID, ORDER_NO, ORDER_DATE, UID, TOTAL_AMT)order_details(ID, OID, PID, PNAME, PRICE, QTY, TOTAL)
See db/db_shopping_cart.sql for full schema and sample data.
