How vozhakov/shop works
This is a PHP/MySQL MVC storefront. A visitor browses categories and products, adds items to a session-backed cart, then submits an order; registered users can manage their account and view purchase history. Administrators manage products and users and review monthly sales statistics. The graph follows the documented capabilities and the sampled routing, controller, cart, and product-model code. Several controllers and domain models were not excerpted, so their documented feature links are shown as unverified rather than inferred call chains.
Main entry points: CartController.php Cart workflow · View.php View rendering · Product_model.php Product data · User_model.php User accounts
Components 21
Request runtime
- Route dispatch
core/Router.php - Controller base
core/Controller.php - View rendering
core/View.php
Storefront
- Catalog browsing
controllers/CatalogController.php - Catalog pages
views/catalog - Product detail
controllers/ProductController.php - Product page
views/product/view_view.php - Category data
models/Category_model.php - Product data
models/Product_model.php
Cart and orders
- Cart workflow
controllers/CartController.php - Session cart
lib/Cart.php - Order history and save
models/Order_model.php
Accounts
- Account cabinet
controllers/CabinetController.php - Login and registration
controllers/UserController.php - User accounts
models/User_model.php
Administration
- Product management
controllers/AdminProductController.php - User administration
controllers/AdminUserController.php - Sales statistics
controllers/AdminSaleController.php - Admin pages
views/admin
Other components
- Visitor
- MySQL database
lib/dbConn.php
Connections 30
- Visitor → Route dispatch: requests
- Route dispatch → Controller base: dispatches
core/Router.php - Controller base → View rendering: creates
core/Controller.php - Catalog browsing → Category data: loads categories
controllers/CatalogController.php - Catalog browsing → Product data: loads products
controllers/CatalogController.php - Catalog browsing → Catalog pages: renders
- Product detail → Product data: loads product
- Product detail → Product page: renders
- Cart workflow → Session cart: reads and updates
controllers/CartController.php - Cart workflow → Product data: loads cart products
controllers/CartController.php - Cart workflow → Category data: loads categories
controllers/CartController.php - Cart workflow → User accounts: loads customer
controllers/CartController.php - Cart workflow → Order history and save: saves order
controllers/CartController.php - Cart workflow → View rendering: renders
controllers/CartController.php - Account cabinet → User accounts: loads and updates
controllers/CabinetController.php - Account cabinet → Order history and save: loads history
controllers/CabinetController.php - Account cabinet → View rendering: renders
controllers/CabinetController.php - Login and registration → User accounts: authenticates and registers
controllers/UserController.php - Login and registration → View rendering: renders
controllers/UserController.php - Product management → Product data: manages products
controllers/AdminProductController.php - Product management → Category data: loads categories
controllers/AdminProductController.php - Product management → View rendering: renders
controllers/AdminProductController.php - User administration → User accounts: manages users
controllers/AdminUserController.php - User administration → View rendering: renders
controllers/AdminUserController.php - Sales statistics → Order history and save: reviews sales
- Sales statistics → View rendering: renders
- Product management → Admin pages: uses admin pages
- Product data → MySQL database: queries
models/Product_model.php - User accounts → MySQL database: persists account data
- Order history and save → MySQL database: persists orders