Appearance
Troubleshooting
For merchants
Logs
var/log/kmh_warehouse_stock_<env>.log (rotating, 7 files). Errors are always written, whatever the logging settings say.
In version 0.4.2 the plugin writes one error:
Warehouse stock could not be updated for an order stock change.
It comes with the exception and the affected product ids. See Warehouse quantities did not change after an order.
The product Stock did not change after switching a warehouse on or off
Switching Active recalculates the products in the background. Check that a message queue worker is running — see Installation → Queue.
- Without the command line: Settings → System → Message queue statistics lists recently processed background jobs. Look for
Kommandhub\WarehouseStockSW\Stock\WarehouseActiveChangedMessage. - With the command line:
bin/console messenger:statsshows messages still waiting.
The products are recalculated in batches of 500. Large warehouses take a moment.
Warehouse quantities did not change after an order
Work through these in order:
- Is the product warehouse-managed? It needs a quantity in at least one active warehouse. Otherwise Shopware changes only its Stock. See How orders take stock.
- Is the plugin active? Orders placed while it was deactivated change only Stock.
- Is Shopware's stock handling on? If your host has turned off Shopware's stock management, Shopware never reports order stock changes, so the warehouses do not change either.
- Check the log for Warehouse stock could not be updated for an order stock change. The order is saved, but the warehouse part of that change was skipped. Correct the quantities in the product's Warehouse stock card, or re-import them.
The Stock field is read-only
That is intended:
- The product has a quantity in a warehouse. Its Stock is the active-warehouse total. Change the quantities in the Warehouse stock card instead. See Stock per product.
- The product is a parent with variants. Each variant has its own stock; the parent's is never used.
To manage a product's stock by hand again, see Stock per product → Go back to a manual stock.
The Stock is 0 although the warehouses hold stock
- All its quantities are in inactive warehouses. Only active warehouses count. Check Settings → Warehouses.
- A warehouse was just switched on and the background job has not run yet. See above.
The Warehouse stock card is missing on the product
- The user's role lacks Warehouse stock → Viewer. See Installation → Permissions.
- The card shows No warehouses yet until you create a warehouse under Settings → Warehouses.
A quantity field in the card is greyed out
- An existing quantity needs Warehouse stock → Editor.
- A warehouse that has no quantity for this product yet needs Warehouse stock → Creator.
"The warehouse could not be saved. Is the code unique?"
Shown for any failed save of a warehouse. Usual causes:
- Another warehouse already uses the Code. Codes must be unique.
- Name or Code is empty.
No warehouse list on the product page
The list is shown only if all of these hold:
- Stock availability on the product page is not Shopware availability only — see Configuration.
- If a rule is set in Show warehouse stock only when this rule matches, it matches the visitor.
- The product shown (for variants: the selected variant) has a quantity in at least one active warehouse.
- Your theme does not replace the buy box block
buy_widget_delivery_informations.
The storefront shows old warehouse names or quantities
Shopware's HTTP cache is cleared for a product when its Stock changes. Changes that leave the total the same — moving pieces from one warehouse to another, renaming a warehouse, changing positions — may not refresh cached product pages. Clear the cache under Settings → System → Caches & indexes, or wait until the cached page expires.
Shopware's availability line disappeared
Stock availability on the product page is set to Warehouse stock only. The warehouse list then replaces Shopware's availability, delivery time and free shipping line. Choose Shopware availability and warehouse stock to show both.
Import errors from the ERP
| Error | Cause | Fix |
|---|---|---|
Duplicate entry on uniq.kmh_warehouse_stock.warehouse_product | A new row id was sent for a warehouse and product that already have a row | Send the existing row's id, or derive ids from warehouse code + product number. See Developer docs → Importing stock |
Duplicate entry on uniq.kmh_warehouse.code | Two warehouses with the same code | Use unique codes |
Validation error on quantity | A negative quantity | Send 0 or more |
403 / missing privileges | The integration's role lacks kmh_warehouse_stock create or update | Give the integration a role with Warehouse stock Creator and Editor |
Still stuck? Contact support with versions and log lines.