Download the PHP package itemvirtual/ecommerce-cart without Composer
On this page you can find all versions of the php package itemvirtual/ecommerce-cart. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download itemvirtual/ecommerce-cart
More information about itemvirtual/ecommerce-cart
Files in itemvirtual/ecommerce-cart
Package ecommerce-cart
Short Description Shopping cart in Laravel
License MIT
Homepage https://github.com/itemvirtual/ecommerce-cart
Informations about the package ecommerce-cart
Ecommerce Cart
This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what PSRs you support to avoid any confusion with users and contributors.
Installation
Install the package via composer:
Publish config (with --force
option to update)
You can change the config
values for cart_session_name
and taxes_included
:
Add EcommerceCart
to your config/app
aliases array
Usage
Use the EcommerceCart
Facade
Add products to cart
Increment or decrement amount
Remove from cart
Set tax
The tax value is set for each item in the cart. To set a global tax value, use setCustomCartData()
It will not affect the calculation of totals on the cartItem, It only serves as data to calculate your totals.
If you save the tax_id value, you can change it with updateCartItemsDataValue()
Set apply tax (p.ex if not European)
Get Totals
Custom Total calculations
If you need to calculate your Cart Totals, set ECOMMERCE_CALCULATE_TOTALS
to false
in your .env
file
Create your service and use EcommerceCart::getItems()
to get your cart contents
Total calculations
Shipping
Add Global shipping
Remove Shipping data
Get Shipping data
Get Cart Items
Destroy Cart
Testing
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Credits
- Sergio
- Itemvirtual
- All Contributors
License
The MIT License (MIT). Please see License File for more information.