PHPackages                             silvershop/stock - 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. silvershop/stock

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

silvershop/stock
================

Adds stock management to SilverShop.

3.1.0(1y ago)213.7k↑100%18[3 issues](https://github.com/silvershop/silvershop-stock/issues)1BSD-3-ClausePHP

Since May 6Pushed 10mo ago6 watchersCompare

[ Source](https://github.com/silvershop/silvershop-stock)[ Packagist](https://packagist.org/packages/silvershop/stock)[ RSS](/packages/silvershop-stock/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (5)Versions (11)Used By (1)

SilverStripe Shop Stock
=======================

[](#silverstripe-shop-stock)

Adds stock management to the SilverStripe Shop module.

[![Build Status](https://camo.githubusercontent.com/8ab15ec2cf71a1abe957f5b8c3f4e96763a6eda7bf3b7d20c4819c3c20e43097/687474703a2f2f696d672e736869656c64732e696f2f7472617669732f73696c76657273686f702f73696c76657273686f702d73746f636b2e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/silvershop/silvershop-stock)[![Code Quality](https://camo.githubusercontent.com/afabf7e41ba643f64f723fd61d00a22577a1c42a93bba1ad0846312a7be10de3/687474703a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f73696c76657273686f702f73696c76657273686f702d73746f636b2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/silvershop/silvershop-stock)[![Code Coverage](https://camo.githubusercontent.com/9877939a440bdeda3c90dd6af7531412bde3b6ff17b02e86828d2f5a1ad345ce/687474703a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f73696c76657273686f702f73696c76657273686f702d73746f636b2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/silvershop/silvershop-stock)[![Version](https://camo.githubusercontent.com/e5b5aac6caf289152a61719d921feb0fdd898d5119bae28ff9328a4965c83248/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73696c76657273686f702f73746f636b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/silvershop/stock)[![License](https://camo.githubusercontent.com/e4e2e936cd78ab5828d121d574479ebf41e6ce758fda0ae1143d6153b6df46e4/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f73696c76657273686f702f73746f636b2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

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

[](#installation)

composer require "silvershop/stock:dev-main"

After installing the module, rebuild the database and create your first product warehouse in the `ProductCatalogAdmin` tab.

Feature Overview
----------------

[](#feature-overview)

This module provides a couple of additional models - `ProductWarehouse`, `ProductWarehouseStock`. A warehouse is a concept of a location where quantity of the stock is held. In a simple case, you may have a single `ProductWarehouse`instance that contains all your stock. More complex shops may have multiple warehouses (i.e a store and a supplier). These warehouses are managed through the `ProductCatalogAdmin` panel in the CMS.

The `ProductWarehouseStock` object manages the relation between a `Product` or a `ProductVariation` and contains the specific count of the product at that particular warehouse.

After installing the module your `Product` edit screen will gain a `Stock` tab which lists all your warehouses and the value count of the product (or variation). Leaving a warehouse stock value as `-1` implies that this warehouse has an unlimited quantity of this product.

When an product is added to the users cart, the quantity is on reserved as the current order is stored in the `Order` table.

*To make sure that stock added to the cart is released on abandoned carts make sure you have the `CartCleanupTask` task enabled as a cron job*

TODO
----

[](#todo)

- Allow prioritizing of warehouses within each product (i.e use warehouse X for before warehouse Y) This should use a sortable grid field based on the `ProductWarehoueStock`.
- Move 'unlimited stock' to a checkbox rather than -1.

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance25

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community27

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 66.2% 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 ~340 days

Recently: every ~545 days

Total

10

Last Release

605d ago

Major Versions

1.0.4 → 2.0.02018-10-01

1.x-dev → 2.x-dev2023-09-27

2.x-dev → 3.0.02024-02-20

### Community

Maintainers

![](https://www.gravatar.com/avatar/485dfc9fc93cad085c83c3276f19b6e9322ee910ab0e1685de0db42228dbf97b?d=identicon)[markguinn](/maintainers/markguinn)

![](https://avatars.githubusercontent.com/u/101629?v=4)[Will Rossiter](/maintainers/wilr)[@wilr](https://github.com/wilr)

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

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

---

Top Contributors

[![wilr](https://avatars.githubusercontent.com/u/101629?v=4)](https://github.com/wilr "wilr (45 commits)")[![RVXD](https://avatars.githubusercontent.com/u/1586761?v=4)](https://github.com/RVXD "RVXD (12 commits)")[![bummzack](https://avatars.githubusercontent.com/u/1006185?v=4)](https://github.com/bummzack "bummzack (3 commits)")[![sn4h](https://avatars.githubusercontent.com/u/131519602?v=4)](https://github.com/sn4h "sn4h (2 commits)")[![wernerkrauss](https://avatars.githubusercontent.com/u/1043925?v=4)](https://github.com/wernerkrauss "wernerkrauss (2 commits)")[![sanderha](https://avatars.githubusercontent.com/u/6941043?v=4)](https://github.com/sanderha "sanderha (1 commits)")[![TheBnl](https://avatars.githubusercontent.com/u/1334195?v=4)](https://github.com/TheBnl "TheBnl (1 commits)")[![tomstgeorge](https://avatars.githubusercontent.com/u/2531109?v=4)](https://github.com/tomstgeorge "tomstgeorge (1 commits)")[![mspacemedia](https://avatars.githubusercontent.com/u/858675?v=4)](https://github.com/mspacemedia "mspacemedia (1 commits)")

---

Tags

silverstripeecommercesilvershop

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/silvershop-stock/health.svg)

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

###  Alternatives

[silverstripe/mssql

Adds MSSQL support to SilverStripe

157.8k1](/packages/silverstripe-mssql)

PHPackages © 2026

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