PHPackages                             totoprayogo1916/codeigniter4-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. [Framework](/categories/framework)
4. /
5. totoprayogo1916/codeigniter4-cart

ActiveLibrary[Framework](/categories/framework)

totoprayogo1916/codeigniter4-cart
=================================

CodeIgniter 4 Cart Library (Originally from CodeIgniter 3)

2.0.5(2y ago)1886MITPHP

Since Oct 11Pushed 2y agoCompare

[ Source](https://github.com/totoprayogo1916/CodeIgniter4-Cart)[ Packagist](https://packagist.org/packages/totoprayogo1916/codeigniter4-cart)[ RSS](/packages/totoprayogo1916-codeigniter4-cart/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (9)Used By (0)

CodeIgniter 4 Cart Library
==========================

[](#codeigniter-4-cart-library)

The Cart Library originally from CodeIgniter 3.

Usage
-----

[](#usage)

Feel free to read the original:

```
use Totoprayogo1916\CodeIgniter\Libraries\Cart;

$cart = new Cart();

// Insert an array of values
$cart->insert([
   'id'      => 'sku_1234ABCD',
   'qty'     => 1,
   'price'   => '19.56',
   'name'    => 'T-Shirt',
   'options' => ['Size' => 'L', 'Color' => 'Red']
]);

// Update an array of values
$cart->update([
   'rowid'   => '4166b0e7fc8446e81e16883e9a812db8',
   'id'      => 'sku_1234ABCD',
   'qty'     => 3,
   'price'   => '24.89',
   'name'    => 'T-Shirt',
   'options' => ['Size' => 'L', 'Color' => 'Red']
]);

// Get the total items.
$cart->total_items();

// Remove an item using its `rowId`
$cart->remove('4166b0e7fc8446e81e16883e9a812db8');

// Clear the shopping cart
$cart->destroy();

// Get the cart contents as an array
$cart->contents();
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.5% 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.

###  Release Activity

Cadence

Every ~71 days

Recently: every ~31 days

Total

8

Last Release

810d ago

Major Versions

1.0.1 → 2.0.02023-10-16

### Community

Maintainers

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

---

Top Contributors

[![totoprayogo1916](https://avatars.githubusercontent.com/u/2387514?v=4)](https://github.com/totoprayogo1916 "totoprayogo1916 (21 commits)")[![narfbg](https://avatars.githubusercontent.com/u/1058011?v=4)](https://github.com/narfbg "narfbg (1 commits)")

---

Tags

cartcodeigniter4codeigniter4-libraryshoppingshopping-cartcartshopping cartcodeigniter4

### Embed Badge

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

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

###  Alternatives

[darryldecode/cart

Laravel 5 Shopping cart

1.4k1.7M7](/packages/darryldecode-cart)[lukepolo/laracart

A simple cart for Laravel

583135.4k1](/packages/lukepolo-laracart)[agungsugiarto/codeigniter4-shoppingcart

CodeIgniter4 shopping cart.

201.5k](/packages/agungsugiarto-codeigniter4-shoppingcart)[anam/phpcart

Simple framework agnostic shopping cart

12115.4k](/packages/anam-phpcart)

PHPackages © 2026

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