Skip to content

Using Stock & Capacity Manager

In the admin area

Open Stock & Capacity in the Extensions navigation group. The list has one row per configured product.

Column Content
Product Name of the product. Searchable and sortable.
Max The Maximum stock. Sortable.
Used Capacity occupied by services that are not cancelled.
Remaining Remaining stock as a badge: danger colour when sold out, warning colour when at or below the Low stock threshold, success colour otherwise.
Enabled Whether Stock management enabled is on. Sortable.

Each row has the actions Edit and Delete.

For a configuration with Stock management enabled switched off, Used and Remaining show 0.

To limit a product:

  1. Click the create button above the list.
  2. Choose the Product.
  3. Enter the Maximum stock, for example 20.
  4. Optionally set Low stock threshold, Show remaining stock to customers and Hide the product from the storefront when sold out.
  5. Save.

The fields are described in Configuration.

What the customer sees

Product page

The extension adds a notice below the product page of a limited product.

  • Stock available, Show remaining stock to customers on: "Only N remaining", for example "Only 9 remaining". The notice is shown for any remaining quantity, not only when stock is low.
  • Stock available, Show remaining stock to customers off: no notice.
  • Sold out: Paymenter's out-of-stock message, in English "Product VPS is out of stock". It is shown regardless of Show remaining stock to customers.

Product page with the notice "Only 9 remaining" below the Add to cart button

The out-of-stock text is Paymenter's translation product.out_of_stock, so it follows the customer's language. The text "Only N remaining" is fixed English text.

The extension does not remove the theme's Add to cart button from a sold-out product. A customer who clicks it is stopped by the check described below.

Category listing

With Hide the product from the storefront when sold out on, a sold-out product is removed from the product list of its category. It comes back as soon as capacity is free again.

The product page itself stays reachable through its direct link and shows the out-of-stock notice there.

Adding to the cart

When a customer adds a limited product to the cart and the quantity is higher than the remaining stock, the cart item is not created and the customer gets Paymenter's out-of-stock message as an error.

This check only looks at the item being added. It does not run when the customer edits an item that is already in the cart or changes its quantity in the cart.

Placing the order

When the customer places the order, the extension checks the whole cart again. It adds up the quantities of all cart lines of the same product and compares the sum with the remaining stock. If one product does not have enough capacity, the order is not created and the customer gets the out-of-stock message for that product.

Items in a cart do not reserve capacity. Only services count, so a customer can have a product in the cart and still be stopped at checkout if someone else ordered the last slot in the meantime.

Automatic behaviour

  • Occupying capacity. A new order creates services with the status pending. They count as used immediately, before the invoice is paid.
  • Releasing capacity. When a service is cancelled or deleted, its quantity no longer counts. Nothing has to be reset by hand.
  • Services created outside the storefront. The checks run on the customer's cart. A service you create in the admin area is not blocked, but it counts as used afterwards.

The extension has no scheduled task, sends no e-mails and no notifications. The low stock warning exists only as the badge colour in the admin list.