silvershop / stock
Adds stock management to SilverShop.
Installs: 11 085
Dependents: 2
Suggesters: 0
Security: 0
Stars: 2
Watchers: 8
Forks: 17
Open Issues: 3
Type:silverstripe-vendormodule
Requires
- silvershop/core: ^4
Requires (Dev)
- guzzle/plugin-mock: ^3.1
- omnipay/dummy: ^2.1
- omnipay/paymentexpress: ^2.1
- phpunit/phpunit: ^9.5
README
Adds stock management to the SilverStripe Shop module.
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
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
-
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.