Stock & Capacity Manager FAQ¶
Questions¶
Does it use Paymenter's built-in stock field?¶
No. The extension stores its configuration in its own table ext_stock_capacity and never reads or writes the product's stock field. Paymenter still applies that field on its own, so leave it empty for products you limit with the extension. See Paymenter's own stock field.
Which services count as used?¶
All services of the product with the status pending, active or suspended. Cancelled services do not count. A service with a quantity above 1 counts with its quantity.
Do unpaid orders occupy capacity?¶
Yes. A pending service counts from the moment the order is created. It stops counting when the service is cancelled or deleted.
Does a product in a cart reserve a slot?¶
No. Only services count. The cart is checked again when the order is placed.
Can I limit a single plan, a configurable option or a server node?¶
No. A stock configuration applies to one product as a whole, and each product can have one configuration.
Can I show "Only N remaining" only when stock is low?¶
No. With Show remaining stock to customers on, the notice is shown for every remaining quantity. The Low stock threshold only changes the badge colour in the admin list.
Am I notified when a product runs low or sells out?¶
No. The extension sends no e-mails or notifications. Check the Remaining column under Stock & Capacity.
Can I change the text "Only N remaining"?¶
Not in the admin area. The text is fixed in the extension and is not translated. The sold-out text is Paymenter's translation product.out_of_stock.
What happens if I lower Maximum stock below the number of existing services?¶
The product is sold out. Existing services stay as they are, and new orders are possible again once the usage is below the maximum.
Can two customers order the last slot at the same moment?¶
The extension counts the existing services at the moment each order is created and does not lock the product while doing so. Two orders placed at exactly the same moment can therefore both pass the check.
What happens to my configurations when I disable the extension?¶
They are kept. While the extension is disabled, nothing is checked or hidden. Uninstalling deletes them. See Uninstalling.
Troubleshooting¶
The extension is not in the list of available extensions¶
Check that the folder is named exactly StockCapacityManager and is located in extensions/Others/. Then run this in the Paymenter root directory:
composer dump-autoload
php artisan optimize:clear
"Only N remaining" does not appear on the product page¶
- Show remaining stock to customers must be on for the product.
- Stock management enabled must be on and Maximum stock must be filled in.
- The notice is appended to the view
products.showof the active theme. A theme that renders its product page with a different view does not show the notice. Blocking and the admin area keep working.
A sold-out product is still listed¶
- Hide the product from the storefront when sold out must be on for the product.
- The option only removes the product from the category listing. The product page stays reachable through its direct link.
- The listing is filtered in the view
products.index. A theme that lists products with a different view is not filtered.
A sold-out product still has an Add to cart button¶
That is expected. The extension does not change the theme's button. The customer is stopped with the out-of-stock message when the product is added to the cart, and again when the order is placed.
The Used count is higher than expected¶
Pending and suspended services count as well, and each service counts with its quantity. Cancel or delete a service to release its capacity.
Used and Remaining both show 0¶
Stock management enabled is off for that configuration, so the product is not limited and nothing is counted.
A customer is told a product is out of stock although the extension shows remaining stock¶
- The quantity in the cart, added up over all cart lines of that product, is higher than the remaining stock.
- Or the product's own Paymenter stock field is set and has run out. Paymenter uses the same message for it.
An error says the table ext_stock_capacity does not exist¶
The migration did not run. Disable and re-enable the extension, or run this in the Paymenter root directory:
php artisan migrate --path=extensions/Others/StockCapacityManager/database/migrations --force