Disabling stock calculation

Since Shopware 6.5.4.0 it is possible to disable the internal stock calculation functions, enabling, for example, an ERP, to handle all stock calculations.

The following changes' effect is that Shopware itself no longer calculates any stock-related values - such as in the event of an order placed - which would have an effect on either the stock or available stock. This change also results in the sales of the products no longer being tracked (found in the product overview in the 'Sales' column).
 

Edits in the shop's configuration
 

Edit in the shopware.yaml

Please note that this change should almost always be made in the z-shopware.yaml, because edits in the shopware.yaml will be overwritten in case of an update, resulting in the change losing effect. Edits in the z-shopware.yaml are unaffected by an update.

In the .yaml file, which you can find in the directory /config/packages/(z-)shopware.yaml, you can now add the following code:
 

shopware:
  stock:
    enable_stock_management: false

After the edit, the shop's cache should be cleared.

A product's stock values still exist after the change, but Shopware no longer adds or detracts stock values triggered by placed or delivered orders.

At this point, for example, an ERP can take the lead when it comes to stock values, without Shopware having any influence over them.

Was this article helpful?