Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ This page lists all environment variables that can be used to configure Shopware
| `ENABLE_SERVICES` | `auto` | Determines if services are enabled, auto detects that based on `APP_ENV`, other possible values are `true` (or `1`) and `false` (or `0`). When set to `0`, Shopware Services won't be installed on the system |
| `FASTLY_API_KEY` | (empty) | API key for Fastly CDN integration. **Keep this value secure and do not commit it to version control.** |
| `INSTANCE_ID` | (empty) | Unique Identifier for the Store: Can be generated with `openssl rand -hex 32` |
| `JWT_PRIVATE_KEY` | (empty) | Can be generated with `shopware-cli project generate-jwt --env` |
| `JWT_PUBLIC_KEY` | (empty) | Can be generated with `shopware-cli project generate-jwt --env` |
| `LOCK_DSN` | `flock` | DSN for Symfony locking |
| `MAILER_DSN` | `null://localhost` | Mailer DSN (Admin Configuration overwrites this) |
| `MESSENGER_TRANSPORT_DSN` | (empty) | DSN for default async queue (example: `amqp://guest:guest@localhost:5672/%2f/default`) |
Expand Down
18 changes: 4 additions & 14 deletions guides/hosting/configurations/shopware/stock.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,15 @@ nav:

When running Shopware 6 there are various configuration options you can use to customize your installation. These configurations reside in the general [bundle configuration](../../../../guides/hosting/configurations/).

Some features of Shopware are only activated when the corresponding feature flag is enabled. Feature flags can be enabled in your project's `.env` file:
## Stock management system

<<< @/docs/snippets/config/stock.sh
The stock management system manages stock levels automatically when orders are placed, cancelled, or completed. The `product.stock` field is the primary source for real-time product stock values.

## Enable stock management system

As of Shopware 6.5.5, the stock management system has been rewritten. The `product.stock` field is now the primary source for real-time product stock values.

The new system is not enabled by default. To enable it, set the `STOCK_HANDLING` feature flag to `1`.

<<< @/docs/snippets/config/stock.sh

In the next major version of Shopware, the new stock management system will become the default.
The stock management system is enabled by default. No additional configuration is required.

## Disable stock management system

Please note this only applies if you have the `STOCK_HANDLING` feature flag enabled.

You can completely disable Shopware's default stock management system. When disabled, none of the event subscribers for order transitions will be executed. In practice, this means that none of the subscribers in `Shopware\Core\Content\Product\Stock\OrderStockSubscriber` will be executed.
You can completely disable Shopware's default stock management system. When disabled, the `product.stock` field will not be updated automatically when orders are placed or completed.

To disable, set `shopware.stock.enable_stock_management` to `false`:

Expand Down
6 changes: 1 addition & 5 deletions guides/plugins/plugins/content/stock/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@ nav:

# Stock

::: info
The stock management system is available from Shopware 6.5.5.0. It is only enabled if the shop owner has enabled the `\STOCK_HANDLING\` feature flag.
:::

The stock management system allows the allocation of stocks to products. Stock is incremented and decremented as orders are placed, modified, canceled, and refunded.

In order to accommodate for the various use cases, the stock management system has been kept as simple as possible. The shop owner can deactivate it entirely if not required.

To enable or disable this feature, refer to [stock configuration](../../../../../guides/hosting/configurations/shopware/stock) section.
To enable or disable this feature, refer to [Stock configuration](../../../../../guides/hosting/configurations/shopware/stock) section.
2 changes: 0 additions & 2 deletions snippets/config/stock.sh

This file was deleted.