How ahmedelaaser/phpcart works
phpcart is a PHP/MySQL storefront with customer accounts, a session-backed shopping cart, checkout, and an administrative back office. The main customer journey is browsing products, viewing a product, adding items to the cart, and checking out with a shipping choice; checkout records an order and its items and updates the customer balance. Separate capabilities include reviews, wishlists, order history, and catalog/customer/order administration. The excerpts show SQL access directly in page handlers; unsampled routes are included only where the README or source index establishes their role, so some links remain undocumented.
Main entry points: connect.php MySQL connection · single.php Product details · checkout.php Checkout · index.php Product catalog
Components 21
Storefront
- Product catalog
index.php - Product details
single.php - Ratings and reviews
single.php
Customer account
- Wishlist
wishlist.php - Order history
my-account.php - Order details
view-order.php - Profile and address
profile.php - Customer authentication
loginprocess.php
Cart and orders
- Shopping cart
cart.php - Cart updates
addtocart.php - Checkout
checkout.php
Administration
- Admin sign-in
admin/login.php - Catalog management
admin/addproduct.php - Order management
admin/order-process.php - Customer management
admin/editcustomer.php - Review moderation
admin/reviews.php - Admin navigation
admin/inc/nav.php
Persistence
- MySQL connection
config/connect.php - MySQL database
Other components
- Shopper
- Administrator
Connections 29
- Shopper → Product catalog: browses
- Product catalog → Product details: opens
index.php - Shopper → Cart updates: adds items
- Product details → Cart updates: submits quantity
single.php - Shopper → Shopping cart: views cart
- Shopper → Checkout: checks out
- Checkout → MySQL database: writes orders
checkout.php - Checkout → MySQL database: updates balance
checkout.php - Shopper → Ratings and reviews: rates product
- Product details → Ratings and reviews: shows reviews
single.php - Shopper → Wishlist: manages wishlist
- Shopper → Customer authentication: signs in
- Shopper → Profile and address: updates details
- Shopper → Order history: views orders
- Order history → Order details: opens order
- Administrator → Admin sign-in: signs in
- Administrator → Catalog management: manages catalog
- Administrator → Order management: manages orders
- Administrator → Customer management: manages customers
- Administrator → Review moderation: views reviews
- Catalog management → Admin navigation: includes navigation
admin/addproduct.php - Catalog management → MySQL connection: queries through
admin/addproduct.php - Order management → MySQL connection: queries through
admin/order-process.php - Customer management → MySQL connection: queries through
admin/editcustomer.php - Review moderation → MySQL connection: queries through
admin/reviews.php - Product catalog → MySQL connection: queries through
index.php - Product details → MySQL connection: queries through
single.php - Checkout → MySQL connection: queries through
checkout.php - MySQL connection → MySQL database: connects
config/connect.php