Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new folder for snippets #1128

Merged
merged 1 commit into from
Sep 29, 2023
Merged
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
22 changes: 2 additions & 20 deletions guides/hosting/configurations/shopware/html-sanitizer.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,8 @@ In the copied `shopware.yaml` file (z-shopware.yaml), you should include an addi

In this example, the `<img>` tag, as well as the CSS attributes `src`, `alt` and `style` are added to the whitelist:

```yaml

shopware:
html_sanitizer:
sets:
- name: basic
tags: [ "img" ]
attributes: [ "src", "alt", "style" ]
options:
- key: HTML.Trusted
value: true
- key: CSS.Trusted
value: true
```
<<< @/docs/snippets/config/html_sanitizer.yaml

If you want to deactivate the sanitizer despite security risks, you can also do this in the `z-shopware.yaml` using the following code:

```yaml

shopware:
html_sanitizer:
enabled: false
```
<<< @/docs/snippets/config/html_sanitizer_disabled.yaml
17 changes: 3 additions & 14 deletions guides/hosting/configurations/shopware/stock.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,15 @@ When running Shopware 6 there are various configuration options you can use to c

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:

```sh
// <project root>/.envell
STOCK_HANDLING=1
```
<<< @/docs/snippets/config/stock.sh

## 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`.

```sh
// <project root>/.envell
STOCK_HANDLING=1
```
<<< @/docs/snippets/config/stock.sh

In the next major version of Shopware, the new stock management system will become the default.

Expand All @@ -37,11 +31,6 @@ You can completely disable Shopware's default stock management system. When disa

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

```yaml
// <project root>/config/packages/shopware.yaml
shopware:
stock:
enable_stock_management: false
```
<<< @/docs/snippets/config/stock_disabled.yaml

For more detailed implementation refer to [Stock](../../../../guides/plugins/plugins/content/stock/) guide section.
11 changes: 11 additions & 0 deletions snippets/config/html_sanitizer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
shopware:
html_sanitizer:
sets:
- name: basic
tags: [ "img" ]
attributes: [ "src", "alt", "style" ]
options:
- key: HTML.Trusted
value: true
- key: CSS.Trusted
value: true
3 changes: 3 additions & 0 deletions snippets/config/html_sanitizer_disabled.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
shopware:
html_sanitizer:
enabled: false
2 changes: 2 additions & 0 deletions snippets/config/stock.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// <project root>/.env
STOCK_HANDLING=1
4 changes: 4 additions & 0 deletions snippets/config/stock_disabled.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# <project root>/config/packages/shopware.yaml
shopware:
stock:
enable_stock_management: false
Loading