PHPackages                             manufacture/manufacturecart - 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. manufacture/manufacturecart

ActiveLibrary

manufacture/manufacturecart
===========================

Simple shopping cart library

1.0.1(5y ago)018MITPHPPHP &gt;=7.1.0

Since May 26Pushed 3y ago1 watchersCompare

[ Source](https://github.com/nosorrow/manufacture-cart)[ Packagist](https://packagist.org/packages/manufacture/manufacturecart)[ Docs](https://github.com/nosorrow/manufacture-cart)[ RSS](/packages/manufacture-manufacturecart/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)DependenciesVersions (3)Used By (0)

Manufacture Shopping Cart Class
-------------------------------

[](#manufacture-shopping-cart-class)

#### How to use

[](#how-to-use)

```
$cart = new Cart();

$p1 = $cart->add(['id' => '45', 'qty' => '2', 'price' => '100', 'name' => 'Jeans',
    'variations' => [
        'color' => 'Black',
        'dimension' => [
            'size' => 'L'
        ]
    ]
]);

$p2 = $cart->add(['id' => '45', 'qty' => '2', 'price' => '100', 'name' => 'Jeans',
    'variations' => [
        'color' => "Blue",
        'dimension' => [
            'size' => 'M'
        ]
    ]
]);

$p3 = $cart->add(['id' => '20', 'qty' => '2', 'price' => '1000', 'name' => 'TB']);
$cart->update($p3, 15);
$cart->decrease($p1);

printf("Total is: %01.2f$ ", $cart->getTotalPrice());
printf(" Total items: %d ", $cart->getTotalItems());
printf(" Jeans price: %01.2f$ ", $cart->getProductPrice($p1));

$sopping_cart = $cart->getCart();

$cart->clear();
```

#### Methods

[](#methods)

```
Cart::add(array $product): string;
Cart::update($rowid, $qty);
Cart::increase($rowid);
Cart::decrease($rowid);
Cart::delete($rowid);
Cart::clear();

Cart::getCart();
Cart::getTotalPrice();
Cart::getTotalItems();
Cart::getProductPrice($rowid);
```

Example `$productArray`

```
$product = [
    'id' => '20',           // *required
    'qty' => '2',           // *required
    'price' => '1000',      // *required
    'name' => 'TV',         // *required
    'variationns'=>[        // *Optional
        'color' => "Black",
        'type'=>'LED'
        'dimension' => [
            'size' => '14 inch'
    ]
];
```

Cart session `$_SESSION['cart']`

```
Array
(
    '00ac11c92e4769676a520fb7ca43245d' => Array
        (
            'id' => 2,
            'qty' => 1,
            'price' => 12.99,
            'name' => 'T Shirt',
            'variations' => Array
                (
                    'color' => 'blue',
                    'dimension' => Array
                        (
                            'size' => 'L'
                        )

                )

            'rowid' => '00ac11c92e4769676a520fb7ca43245d',
            'subtotal' => 12.99
        )

)
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

2177d ago

### Community

Maintainers

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

---

Top Contributors

[![nosorrow](https://avatars.githubusercontent.com/u/25552969?v=4)](https://github.com/nosorrow "nosorrow (17 commits)")

---

Tags

cartshopping

### Embed Badge

![Health badge](/badges/manufacture-manufacturecart/health.svg)

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

###  Alternatives

[lukepolo/laracart

A simple cart for Laravel

583135.4k1](/packages/lukepolo-laracart)[sylius/sylius-standard

Starting point for projects powered by Sylius eCommerce.

271291.3k](/packages/sylius-sylius-standard)[jackiedo/cart

A package used to create and manage carts (such as shopping, recently viewed, compared items...) in Laravel application.

20852.7k](/packages/jackiedo-cart)[amsgames/laravel-shop

Package set to provide shop or e-commerce functionality (such as CART, ORDERS, TRANSACTIONS and ITEMS) to Laravel for customizable builds.

4845.9k](/packages/amsgames-laravel-shop)[realrashid/cart

Meet Cart — your ultimate solution for seamless shopping cart functionality in Laravel applications. Cart simplifies the complexities of shopping cart operations, from product additions to total calculations, ensuring a frictionless user experience.

1093.6k](/packages/realrashid-cart)[syscover/shopping-cart

Shopping Cart package

299.1k1](/packages/syscover-shopping-cart)

PHPackages © 2026

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