PHPackages                             eubby06/cart - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. eubby06/cart

ActiveLibrary

eubby06/cart
============

A simple shopping cart class based on Codeigniter cart class

07

Since May 17Pushed 13y ago1 watchersCompare

[ Source](https://github.com/eubby06/cart)[ Packagist](https://packagist.org/packages/eubby06/cart)[ RSS](/packages/eubby06-cart/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Shopping Cart Package
=====================

[](#shopping-cart-package)

This shopping cart class is heavily based on codeigniter's cart class.

\##INSTALLATION

```
"require": {
	"laravel/framework": "4.0.*",
	"eubby06/cart": "dev-master",
	}

composer update

```

add to providers:

```
'providers' => array(
                    'Eubby06\Cart\CartServiceProvider'

```

add to aliases:

```
'aliases' => array(
                'Cart' => 'Eubby06\Cart\Facades\Cart'

```

\##USAGE

```
Add Item:

//create an array variable
$data = array(
               'id'      => 'sku001',
               'qty'     => 1,
               'price'   => 22.60,
               'name'    => 'Headset'
            );

//call Cart method insert and pass the array data
Cart::insert($data);

Update Qty:

//create an array variable
$data = array(
               'rowid' => 'n45cm8cdf16sdf3sdfsdfs0b6gde8gd',
               'qty'   => 3
            );

Cart::update($data);

Apply Discount:

//create an array variable
$discount = array(
               'value'      => '10',
               'type'     => 'percentage',
               'code'   => 'urdiscountcode'
            );

//call Cart method insert and pass the array data
Cart::applyDiscount($discount);

//returns cart total amount
Cart::total();

//returns total number of items in the cart.
Cart::totalItems();

//returns all items in the cart.
Cart::contents();

//return boolean
Cart::hasOptions(rowid);

//returns item options
Cart::productOptions(rowid);

//destroy cart session
Cart::destroy();
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/cce978594c9d56b5239dbaddfd19d1f7ccaff4d39d1d997287220970b409d510?d=identicon)[eubby06](/maintainers/eubby06)

---

Top Contributors

[![eubby06](https://avatars.githubusercontent.com/u/3950463?v=4)](https://github.com/eubby06 "eubby06 (9 commits)")

### Embed Badge

![Health badge](/badges/eubby06-cart/health.svg)

```
[![Health](https://phpackages.com/badges/eubby06-cart/health.svg)](https://phpackages.com/packages/eubby06-cart)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
