phpShop is a simple PHP based web store that allows users to browse the items and manage a simple cart.
The goal is to implement a "fully functioning" shop in PHP.
Currently, there is no support for unique users, and the set of items for sale in the shop is small and hard-coded in sample-products.json
.
PHP backend, serves the Client files, provides REST endpoints, and interacts with the Database.
Views rendered using the Laravel Blade templating engine.
Currently, this is implemented using JSON with a simple file storing system.
Basic data structures
Product : {
id : 0,
categories : [],
name: "",
blurb: "",
description: "",
}
Price : {
id: 0,
productId : 0,
dollars: 0
}
Cart : {
id : 0,
customerId : 0,
items : [
{
productId : 0,
quantity: 0
}
]
}
Customer : {
id : 0,
name : {
first : ""
last: ""
},
address : ""
}
Includes a Vagrant file for creating a VM based on the Scotch-Box VM.
Note: You will need to modify the /etc/apache2/sites-enabled/*.conf
files to have their DocumentRoot = /var/www
.