Without docker
php -S http://127.0.0.1:8000
With docker
cd docker && ./build.sh
Please, create implemnentation of Shopping Cart for our shop using vanilla PHP, that allows to:
- Add products
- Change quantity of added products
- Remove product
- Use different Cart instances (usual Cart and Wishlist)
Cart should:
- be able to output all the products, that is inside it
- has method to get total amount
- increase quantity, if user adds same product again
- has ability to use different storage type, that can be set up in config
- implement 2 storage engines - redis and sqlite
UI we do not care, it can be the simpliest, no design required. Interaction with Cart can be done in js way (ajax) or without it (depends on your skills)
Products located in data.csv Namespaces and class autoload required