dev-master
9999999-devCart plugin for CakePHP
The Requires
- cakephp/cakephp >=3.3.2 <4.0.0
- php >=5.6
The Development Requires
1.0
1.0.0.0Cart plugin for CakePHP
The Requires
- php >=5.5.9
- cakephp/cakephp >=3.3.2 <4.0.0
The Development Requires
Wallogit.com
2017 © Pedro Peláez
Cart plugin for CakePHP
You can install this plugin into your CakePHP application using composer., (*2)
The recommended way to install composer packages is:, (*3)
composer require funayaki/cakephp-cart
Implement EntityBuyableAwareInterface:, (*4)
class Item extends Entity implements EntityBuyableAwareInterface
{
public function getPrice()
{
return $this->price;
}
public function getBuyableLimit()
{
return INF;
}
}
Load CartComponent:, (*5)
<?php
class AppController extends Controller
{
public function initialize()
{
parent::initialize();
$this->loadComponent('Cart.Cart');
}
}
Add item to cart:, (*6)
$this->Cart->add($item);
Update item quantity in cart:, (*7)
$this->Cart->edit($item, 5);
Get item(s) in cart:, (*8)
$this->Cart->get($item); $this->Cart->get();
Calculate item total price in cart:, (*9)
$this->Cart->total($item);
Calculate total price in cart:, (*10)
$this->Cart->total();
Count quantity item(s) in cart:, (*11)
$this->Cart->count($item); $this->Cart->count();
Delete item from cart:, (*12)
$this->Cart->delete($item);
Delete all items from cart:, (*13)
$this->Cart->clear();
Cart plugin for CakePHP
Cart plugin for CakePHP