Download the PHP package nhanchaukp/codeigniter4-cart-library without Composer
On this page you can find all versions of the php package nhanchaukp/codeigniter4-cart-library. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nhanchaukp/codeigniter4-cart-library
More information about nhanchaukp/codeigniter4-cart-library
Files in nhanchaukp/codeigniter4-cart-library
Package codeigniter4-cart-library
Short Description A basic port of the codeigniter 3 cart module for CodeIgniter 4.
License MIT
Homepage https://github.com/nhanchaukp/codeigniter4-cart-library
Informations about the package codeigniter4-cart-library
CodeIgniter4-Cart-Library
This is a
composer
installable, CodeIgniter 4 module that is nearly a direct port of the Codeigniter 3 Cart Library Class. Of course, this has been mildly updated and is consistent with the new version of the framework.This means that instead of just being a class that you can use in your projects, this library has been updated with Namespaces, has been refactored to adhere to the CodeIgniter style guide and also has been built to use CodeIgniter 4's Service Container to allow for a shared Cart instance across your application.
More detailed documentation can be found here. Please note that the documentation is for the CodeIgniter 3 library but the fundamentals and inner workings of the library are still identical. The most notable changes are how you use it (read below) and to return the total items in your cart, you now call
$cart->totalItems()
instead of$this->cart->total_items()
.Please take note that there are no tests for this package since it is just a port from an existing Codeigniter library and works just the same.
Installation:
- Install via composer
composer require nhanchaukp/codeigniter4-cart-library
- Add it to the
$psr4
array inapp/Config/Autoload.php
:
Usage
License:
MIT License
Copyright (c) 2021 Jason Napolitano
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.