Download the PHP package tomshaw/shopcart without Composer
On this page you can find all versions of the php package tomshaw/shopcart. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tomshaw/shopcart
More information about tomshaw/shopcart
Files in tomshaw/shopcart
Package shopcart
Short Description A modern easy to use Laravel shopping cart
License MIT
Informations about the package shopcart
ShopCart 🛒
ShopCart is a modern easy to use Laravel shopping cart...
Installation
You can install the package via composer:
Publish configuration file
Requirements
- PHP 8.5+
- Laravel 13.0
Basic Usage
Adding an item to the shopping cart.
Note: Cart item constructor properties are validated when creating or updating cart items.
Note: A unique random integer
rowIdis created and used to identify cart items.
Adding an item with product options to the shopping cart.
Accessing product options.
Updating an item and product options in the shopping cart.
Removing an item from the shopping cart.
Deleting the shopping cart after checkout.
Cart Totals
Sums the properties:
tax,price,subtotalandquantity.
Computed Properties
Cart items automatically calculate subTotal, totalTax, and totalPrice. These values are computed on-demand and are always accurate.
Tax Rates
To set a default tax rate add the following environment variable in your application .env.
You can easily apply item specific tax rates at run time.
Number Formatting
Number formating is handled by adding the following environment variables to your application .env.
Cart Methods
Get item from collection by rowId.
Check if cart item exists by rowId.
Get cart as collection or array.
Use Laravel Collection methods for advanced operations.
Casting the cart as an array or json;
Changelog
For changes made to the project, see the Changelog.
Contributing
Please see CONTRIBUTING for details.
License
The MIT License (MIT). See License File for more information.
All versions of shopcart with dependencies
illuminate/events Version ^13.0
illuminate/session Version ^13.0
illuminate/support Version ^13.0