bozboz / ecommerce
Shop/payment functionality for Bozboz sites
Requires
- bozboz/admin: 2.*
- bozboz/checkout: ~2
- bozboz/orders: 1.0.2
- bozboz/payment: 1.0.0
- bozboz/products: 1.0.0
- bozboz/shipping: 1.0.2
This package is not auto-updated.
Last update: 2021-06-04 10:19:22 UTC
README
Installation
-
Require the package in Composer, by running
composer require bozboz/ecommerce
-
Add to the providers array in config/app.php
Bozboz\Ecommerce\Providers\EcommerceServiceProvider::class,
-
Run
php artisan vendor:publish && php artisan migrate
-
Edit
config/ecommerce.php
Usage
CartController
The cart route is set in config under 'ecommerce.cart.route'. This will set up the following routes, prefixed with the configured cart route:
+--------+--------------------------------+------------------------+
| Method | URL | Use |
+--------+--------------------------------+------------------------+
| GET | / | view cart |
| POST | / | update cart quantities |
| DELETE | / | clear cart |
| POST | /items | add item |
| DELETE | /items/{id} | delete item via form |
| GET | /items/remove/{id}/{sessionId} | delete item via link |
+--------+--------------------------------+------------------------+
For more information regarding cart usage see bozboz/orders
#TODO: The CartController should probably be in bozboz/orders since that's where all the models are.
Other Packages
The idea behind having these all split up in to separate packages is that they could be used in isolation though that idea has not yet been properly explored and there's a good chance that they wouldn't function in any useful/meaningful way on their own.
Each package has its own readme so follow the links above to read up on how to use them.