PHPackages                             ginioo/shopping-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ginioo/shopping-cart

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ginioo/shopping-cart
====================

a simple shopping cart package

30PHP

Since Feb 28Pushed 7y ago1 watchersCompare

[ Source](https://github.com/Ginioo/shopping-cart)[ Packagist](https://packagist.org/packages/ginioo/shopping-cart)[ RSS](/packages/ginioo-shopping-cart/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

ginioo/shopping-cart [![Build Status](https://camo.githubusercontent.com/6fbcbb89058c86a5660284aeb2f4b4b319b05da431a4392ee96cdc1737c67970/68747470733a2f2f7472617669732d63692e6f72672f47696e696f6f2f73686f7070696e672d636172742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Ginioo/shopping-cart)
================================================================================================================================================================================================================================================================================================================

[](#giniooshopping-cart-)

a simple php shopping cart package

### Project setup

[](#project-setup)

```
composer install

```

### Run test suite for development

[](#run-test-suite-for-development)

Execute unit tests

```
composer test

```

List available tests

```
composer list-tests

```

Sample

```
$product1 = Product::createProduct([
    'id'       => 'P001',
    'name'     => 'A Sample Product',
    'price'    => 79,
    'currency' => Product::CURRENCY_NTD,
    'stock'    => 5,
]);

$product2 = Product::createProduct([
    'id'       => 'P002',
    'name'     => 'A Sample Product 2',
    'price'    => 80,
    'currency' => Product::CURRENCY_NTD,
    'stock'    => 5,
]);

$cart = ShoppingCart::createShoppingCart();
$cart->add($product1);
$cart->add($product2);
// or $cart = ShoppingCart::createShoppingCart([$product1, $product2]);

$cart->getCount(); // 2;

$oldCart = $cart->remove($product1);

$cart->getCount(); // 1

$cart->getPrice(); // 80
```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

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/4d212a609c38e18cf65313c290e4f5e2c93596177b00db2bed792c9f3d66fc6f?d=identicon)[Ginioo](/maintainers/Ginioo)

### Embed Badge

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

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

###  Alternatives

[froala/wysiwyg-editor

A beautiful jQuery WYSIWYG HTML rich text editor. High performance and modern design make it easy to use for developers and loved by users.

5.4k306.9k3](/packages/froala-wysiwyg-editor)[rewieer/taskschedulerbundle

Task Scheduler with CRON for Symfony

63242.1k](/packages/rewieer-taskschedulerbundle)[ghoster/module-outofstockatlast

Magento 2.4.x module Sort Out Of Stock Product At last the product list

60122.6k](/packages/ghoster-module-outofstockatlast)[fof/byobu

Well integrated, advanced private discussions.

61105.8k9](/packages/fof-byobu)[flowpack/listable

Tiny extension for listing things

35209.0k7](/packages/flowpack-listable)[snowdog/module-alpaca-components

Components of the Alpaca theme for Magento 2

4582.2k2](/packages/snowdog-module-alpaca-components)

PHPackages © 2026

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