Download the PHP package razorisuru/shopping-cart without Composer
On this page you can find all versions of the php package razorisuru/shopping-cart. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download razorisuru/shopping-cart
More information about razorisuru/shopping-cart
Files in razorisuru/shopping-cart
Package shopping-cart
Short Description The ShoppingCart package provides a simple and flexible solution for managing a shopping cart in Laravel applications. It uses sessions to store cart items, allowing you to easily add, update, remove, and clear items. With support for custom attributes, price calculations, and total cost computation, this package is ideal for building e-commerce and order management systems.
License MIT
Informations about the package shopping-cart
ShoppingCart for Laravel
ShoppingCart is a simple and lightweight package for managing a shopping cart in Laravel applications using sessions. This package is ideal for e-commerce platforms or any project requiring shopping cart functionality.
Features
- Add items to the cart with quantity, price, and custom attributes.
- Update or remove items from the cart.
- Calculate the total cost of items in the cart.
- Clear all items in the cart.
- Session-based for seamless integration.
Installation
-
Clone the repository:
- Configure Composer to use the token (Optional):
Usage
Declare the cart:
-
Adding Items to the Cart:
-
Getting All Cart Items:
-
Updating an Item's Quantity:
-
Removing an Item:
-
Clearing the Cart:
-
Calculating Total Cost:
-
Counting the user cart items:
- Counting the user cart Product Count:
Requirements PHP 8.0 or newer Laravel 8 or newer illuminate/support
Contributing
Contributions are welcome! To contribute:
- Fork the repository.
- Create a feature branch:
git checkout -b feature-name
. - Commit your changes:
git commit -m 'Add some feature'
. - Push to the branch:
git push origin feature-name
. - Open a pull request.
License
This project is open-sourced software licensed under the MIT license.