Skip to content

levelfiveteam/simplecart

Repository files navigation

Simple Cart for Zend Framework 2

Build Status Coverage Status

Please note; this only works with Zend Framework 2 as we use the Zend Validator and Zend Session components

This simple cart cannot get any simpler.

Initialise the cart with a name

$simpleCart = new SimpleCart('test');

To add an item

$item = [
    'name' => 'Red Balloon',
    'uniqueId' => 'RED001',
    'amount' => 10.99,
    'quantity' => '1',
    'currency' => 'GBP' // optional
];

$simpleCart->addItem($item);

To update an item

$simpleCart->updateItem('RED001', 3);

To remove an item

$simpleCart->removeItem('RED001');

About

Simple Cart for ZF2 - It really is simple. PHP, Add/Update/Remove items without a database.

Resources

Stars

Watchers

Forks

Packages

No packages published