How torlaw1692/php-ecommerce-app works
This is a PHP/MySQL video-game storefront. A shopper opens the catalog, which loads products and offers add-to-cart; the cart page displays items and handles quantity updates and removal. Controllers translate database rows for the views, while model functions perform catalog and cart queries through a shared connection to MySQL/MariaDB. The README also documents product images and shared styling. Relationships shown here are limited to calls and references visible in the excerpts; the database schema and image assets were not sampled.
Main entry points: products.php Product catalog · cart.php Shopping cart · cart_controller.php Cart controller · database.php Connection config
Components 10
Storefront UI
- Product catalog
view/products.php - Shopping cart
view/cart.php - Shared styling
view/styles.css
Request handling
- Catalog controller
controller/products_controller.php - Cart controller
controller/cart_controller.php
Persistence
- Product queries
model/products_db.php - Cart queries
model/cart_db.php - Connection config
model/database.php
Other components
- Shopper
- MySQL/MariaDB
Connections 12
- Shopper → Product catalog: browses
README.md - Shopper → Shopping cart: manages cart
README.md - Product catalog → Catalog controller: loads products
view/products.php - Product catalog → Cart controller: adds product
view/products.php - Shopping cart → Cart controller: updates cart
view/cart.php - Catalog controller → Product queries: queries products
controller/products_controller.php - Cart controller → Cart queries: manages items
controller/cart_controller.php - Product queries → Connection config: gets connection
model/products_db.php - Cart queries → Connection config: gets connection
model/cart_db.php - Connection config → MySQL/MariaDB: connects
model/database.php - Product catalog → Shared styling: loads styles
view/products.php - Shopping cart → Shared styling: loads styles
view/cart.php