PHPackages                             i-lateral/silverstripe-commerce-stockkeeping - 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. [Database &amp; ORM](/categories/database)
4. /
5. i-lateral/silverstripe-commerce-stockkeeping

ActiveSilverstripe-module[Database &amp; ORM](/categories/database)

i-lateral/silverstripe-commerce-stockkeeping
============================================

A Silverstripe module that adds stock levels to products and allows these to be reduced when the order reaches a specified status

1592[1 PRs](https://github.com/i-lateral/silverstripe-commerce-stockkeeping/pulls)PHP

Since Oct 27Pushed 9y ago2 watchersCompare

[ Source](https://github.com/i-lateral/silverstripe-commerce-stockkeeping)[ Packagist](https://packagist.org/packages/i-lateral/silverstripe-commerce-stockkeeping)[ RSS](/packages/i-lateral-silverstripe-commerce-stockkeeping/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

NOTICE: This module is depreciated, merged into the core commerce module and will shortly be removed from Packagist
===================================================================================================================

[](#notice-this-module-is-depreciated-merged-into-the-core-commerce-module-and-will-shortly-be-removed-from-packagist)

Silverstripe Commerce Stock Keeping
===================================

[](#silverstripe-commerce-stock-keeping)

Module designed to add basic stock keeping to the CMS. All products can be given a "stock level". Once a user pays for the particular product the stock level is reduced by the quantity of the ordered items.

At the moment this is pretty rudimentory and only updates stock levels when an order object is saved. This probably should be improved in the future, maybe one mechanism that can be linked to from whenever a user places an order.

Dependancies
------------

[](#dependancies)

- SilverStripe Framework 3.1.x
- Silverstripe Commerce 2.0

Installation
------------

[](#installation)

Install this module either by downloading and adding to:

```
[silverstripe-root]/commerce-stockkeeping

```

Then run: dev/build/?flush=all

Or alternativly add use composer:

```
i-lateral/silverstripe-commerce-stockkeeping

```

Usage
-----

[](#usage)

By default this module allows you to set a "StockLevel" on a product via the admin, attempts to detect if a product can be added to the shopping cart (based on the stock level and quantity set) and decreases the stock level when a user makes a purchase.

**NOTE** If you do not wish for the add to cart form to appear when an item is out of stock, you will need to add the following to your Product templates:

```

        $Form

```

### How to set when an order auto updates stock

[](#how-to-set-when-an-order-auto-updates-stock)

By default when an order is set to "paid" the stock levels are updated.

You can change this behaviour by using the config variable:

```
CommerceStockKeeping.completion_status

```

### Negative stock

[](#negative-stock)

By default, this module will reduce stock levels to negative numbers when an order is complete.

If you want the stock levels to not go below 0, you can use the following config variable:

```
CommerceStockKeeping.allow_negative

```

### Adding items to the cart without enough stock

[](#adding-items-to-the-cart-without-enough-stock)

Be default trying to add an items with not enough stock to the cart (or updating the cart beyond a level of stock allowed) is not allowed and will throw a ValidationException (to be caught by the product form).

If you want to enable users purchase more items than are in stock, then use the following conig variable:

```
CommerceStockKeeping.allow_adding

```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

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/c7d4998767cb41bf0048a65158559384fbab33751b26c996d6367019c68c4f8b?d=identicon)[DFT](/maintainers/DFT)

---

Top Contributors

[![mlewis-everley](https://avatars.githubusercontent.com/u/687143?v=4)](https://github.com/mlewis-everley "mlewis-everley (11 commits)")

### Embed Badge

![Health badge](/badges/i-lateral-silverstripe-commerce-stockkeeping/health.svg)

```
[![Health](https://phpackages.com/badges/i-lateral-silverstripe-commerce-stockkeeping/health.svg)](https://phpackages.com/packages/i-lateral-silverstripe-commerce-stockkeeping)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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