From 688e798994f13db900ac22efb1adbbd241343e4b Mon Sep 17 00:00:00 2001 From: shopwareBot Date: Thu, 2 Apr 2026 18:19:42 +0000 Subject: [PATCH 1/4] [create-pull-request] automated change --- ...-manipulation-script-services-reference.md | 815 +++++++++--------- ...stom-endpoint-script-services-reference.md | 72 +- .../data-loading-script-services-reference.md | 199 +++-- ...miscellaneous-script-services-reference.md | 212 +++-- .../product-script-services-reference.md | 149 ++-- .../script-hooks-reference.md | 229 ++--- .../trigger-events-reference.md | 91 ++ .../webhook-events-reference.md | 121 +++ 8 files changed, 1036 insertions(+), 852 deletions(-) create mode 100644 resources/references/app-reference/script-reference/trigger-events-reference.md create mode 100644 resources/references/app-reference/script-reference/webhook-events-reference.md diff --git a/resources/references/app-reference/script-reference/cart-manipulation-script-services-reference.md b/resources/references/app-reference/script-reference/cart-manipulation-script-services-reference.md index 967d4b70e1..3af77edf46 100644 --- a/resources/references/app-reference/script-reference/cart-manipulation-script-services-reference.md +++ b/resources/references/app-reference/script-reference/cart-manipulation-script-services-reference.md @@ -13,23 +13,6 @@ nav: The `cart` service allows you to manipulate the cart. You can use the cart service to add line-items, change prices, add discounts, etc. to the cart. -### items() - -* The `items()` method returns all line-items of the current cart for further manipulation. - -* **Returns** [`Shopware\Core\Checkout\Cart\Facade\ItemsFacade`](./cart-manipulation-script-services-reference#itemsfacade) - - A `ItemsFacade` containing all line-items in the current cart as a collection. - -### products() - -* The `product()` method returns all products of the current cart for further manipulation. - - Similar to the `items()` method, but the line-items are filtered, to only contain product line items. -* **Returns** [`Shopware\Core\Checkout\Cart\Facade\ProductsFacade`](./cart-manipulation-script-services-reference#productsfacade) - - A `ProductsFacade` containing all product line-items in the current cart as a collection. - ### calculate() * The `calculate()` method recalculates the whole cart. @@ -37,40 +20,21 @@ You can use the cart service to add line-items, change prices, add discounts, et Use this to get the correct prices after you made changes to the cart. Note that after calling the `calculate()` all collections (e.g. items(), products()) get new references, so if you still hold references to things inside the cart, these are outdated after calling `calculate()`. - + The `calculate()` method will be called automatically after your cart script executed. +### count() -### price() - -* The `price()` method returns the current price of the cart. - - Note that this price may be outdated, if you changed something inside the cart in your script. - Use the `calculate()` method to recalculate the cart and update the price. -* **Returns** [`Shopware\Core\Checkout\Cart\Facade\CartPriceFacade`](./cart-manipulation-script-services-reference#cartpricefacade) - - The calculated price of the cart. - -### errors() - -* The `errors()` method returns the current errors of the cart. - - You can use it to add new errors or warning or to remove existing ones. -* **Returns** [`Shopware\Core\Checkout\Cart\Facade\ErrorsFacade`](./cart-manipulation-script-services-reference#errorsfacade) - - A `ErrorsFacade` containing all cart errors as a collection (may be an empty collection if there are no errors). - -### states() - -* `states()` allows you to access the state functions of the current cart. - -* **Returns** [`Shopware\Core\Checkout\Cart\Facade\StatesFacade`](./cart-manipulation-script-services-reference#statesfacade) +* `count()` returns the count of line-items in this collection. - A `StatesFacade` containing all cart states as a collection (maybe an empty collection if there are no states). + Note that it does only count the line-items directly in this collection and not child line-items of those. +* **Returns** `int` + The number of line-items in this collection. ### discount() * The `discount()` methods creates a new discount line-item with the given type and value. + * **Returns** [`Shopware\Core\Checkout\Cart\Facade\DiscountFacade`](./cart-manipulation-script-services-reference#discountfacade) Returns the newly created discount line-item. @@ -100,7 +64,6 @@ You can use the cart service to add line-items, change prices, add discounts, et {% do services.cart.discount('my-discount', 'absolute', price, 'Fancy discount') %} ``` - * Add a relative discount to the cart. ```twig @@ -114,40 +77,64 @@ You can use the cart service to add line-items, change prices, add discounts, et {% do services.cart.discount('my-discount', 'percentage', -10, 'Fancy discount') %} ``` +### errors() -### count() - -* `count()` returns the count of line-items in this collection. - - Note that it does only count the line-items directly in this collection and not child line-items of those. -* **Returns** `int` +* The `errors()` method returns the current errors of the cart. - The number of line-items in this collection. + You can use it to add new errors or warning or to remove existing ones. +* **Returns** [`Shopware\Core\Checkout\Cart\Facade\ErrorsFacade`](./cart-manipulation-script-services-reference#errorsfacade) + A `ErrorsFacade` containing all cart errors as a collection (may be an empty collection if there are no errors). ### get() * `get()` returns the line-item with the given id from this collection. + * **Returns** [`Shopware\Core\Checkout\Cart\Facade\ItemFacade`](./cart-manipulation-script-services-reference#itemfacade) | `null` The line-item with the given id, or null if it does not exist. * **Arguments:** * *`string`* **id**: The id of the line-item that should be returned. - ### has() * `has()` checks if a line-item with the given id exists in this collection. + * **Returns** `bool` Returns true if the given line-item or a line-item with the given id already exists in the collection, false otherwise. * **Arguments:** * *`string|\ItemFacade`* **id**: The id or a line-item that should be checked if it already exists in the collection. +### items() +* The `items()` method returns all line-items of the current cart for further manipulation. + + +* **Returns** [`Shopware\Core\Checkout\Cart\Facade\ItemsFacade`](./cart-manipulation-script-services-reference#itemsfacade) + + A `ItemsFacade` containing all line-items in the current cart as a collection. +### price() + +* The `price()` method returns the current price of the cart. + + Note that this price may be outdated, if you changed something inside the cart in your script. + Use the `calculate()` method to recalculate the cart and update the price. +* **Returns** [`Shopware\Core\Checkout\Cart\Facade\CartPriceFacade`](./cart-manipulation-script-services-reference#cartpricefacade) + + The calculated price of the cart. +### products() + +* The `product()` method returns all products of the current cart for further manipulation. + + Similar to the `items()` method, but the line-items are filtered, to only contain product line items. +* **Returns** [`Shopware\Core\Checkout\Cart\Facade\ProductsFacade`](./cart-manipulation-script-services-reference#productsfacade) + + A `ProductsFacade` containing all product line-items in the current cart as a collection. ### remove() * `remove()` removes the given line-item or the line-item with the given id from this collection. + * **Arguments:** * *`string|\ItemFacade`* **id**: The id of the line-item or the line-item that should be removed. * **Examples:** @@ -158,11 +145,19 @@ You can use the cart service to add line-items, change prices, add discounts, et {% do services.cart.products.remove(hook.ids.get('p1')) %} ``` +### states() + +* `states()` allows you to access the state functions of the current cart. + +* **Returns** [`Shopware\Core\Checkout\Cart\Facade\StatesFacade`](./cart-manipulation-script-services-reference#statesfacade) + + A `StatesFacade` containing all cart states as a collection (maybe an empty collection if there are no states). ### surcharge() * The `surcharge()` methods creates a new surcharge line-item with the given type and value. + * **Returns** [`Shopware\Core\Checkout\Cart\Facade\DiscountFacade`](./cart-manipulation-script-services-reference#discountfacade) Returns the newly created surcharge line-item. @@ -184,7 +179,6 @@ You can use the cart service to add line-items, change prices, add discounts, et {% do services.cart.surcharge('my-surcharge', 'absolute', price, 'Fancy surcharge') %} ``` - * Add a relative surcharge to the cart. ```twig @@ -198,31 +192,38 @@ You can use the cart service to add line-items, change prices, add discounts, et {% do services.cart.surcharge('my-surcharge', 'percentage', -10, 'Fancy discount') %} ``` - _________ - ## [`Shopware\Core\Checkout\Cart\Facade\CartPriceFacade`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Cart/Facade/CartPriceFacade.php) {#cartpricefacade} The CartPriceFacade is a wrapper around the calculated price of a cart. -### getNet() -* `getNet()` returns the net price of the cart. +### create() -* **Returns** `float` +* `create()` creates a new `PriceCollection` based on an array of prices. - Returns the net price of the cart as float. + +* **Returns** [`Shopware\Core\Framework\DataAbstractionLayer\Pricing\PriceCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Pricing/PriceCollection.php) -### getTotal() + Returns the newly created `PriceCollection`. +* **Arguments:** + * *`array`* **price**: The prices for the new collection, indexed by the currency-id or iso-code of the currency. +* **Examples:** + * Create a new Price in the default currency. -* `getTotal()` returns the total price of the cart that has to be paid by the customer. + ```twig + {% set price = services.cart.price.create({ + 'default': { 'gross': 19.99, 'net': 19.99} + }) %} + ``` +### getNet() - Depending on the tax settings this may be the gross or net price. - Note that this price is already rounded, to get the raw price before rounding use `getRaw()`. -* **Returns** `float` +* `getNet()` returns the net price of the cart. - The rounded total price of the cart as float. + +* **Returns** `float` + Returns the net price of the cart as float. ### getPosition() * `getPosition()` returns the sum price of all line-items in the cart. @@ -232,60 +233,42 @@ The CartPriceFacade is a wrapper around the calculated price of a cart. * **Returns** `float` The position price as float. - -### getRounded() - -* Alias for `getTotal()`. - -* **Returns** `float` - - The rounded total price of the cart as float. - ### getRaw() * `getRaw() returns the total price of the cart before rounding. + * **Returns** `float` The total price before rounding as float. +### getRounded() -### create() +* Alias for `getTotal()`. -* `create()` creates a new `PriceCollection` based on an array of prices. + +* **Returns** `float` -* **Returns** [`Shopware\Core\Framework\DataAbstractionLayer\Pricing\PriceCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Pricing/PriceCollection.php) + The rounded total price of the cart as float. +### getTotal() - Returns the newly created `PriceCollection`. -* **Arguments:** - * *`array`* **price**: The prices for the new collection, indexed by the currency-id or iso-code of the currency. -* **Examples:** - * Create a new Price in the default currency. +* `getTotal()` returns the total price of the cart that has to be paid by the customer. - ```twig - {% set price = services.cart.price.create({ - 'default': { 'gross': 19.99, 'net': 19.99} - }) %} - ``` + Depending on the tax settings this may be the gross or net price. + Note that this price is already rounded, to get the raw price before rounding use `getRaw()`. +* **Returns** `float` + The rounded total price of the cart as float. _________ - ## [`Shopware\Core\Checkout\Cart\Facade\ContainerFacade`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Cart/Facade/ContainerFacade.php) {#containerfacade} The ContainerFacade allows you to wrap multiple line-items inside a container line-item. -### products() - -* The `product()` method returns all products inside the current container for further manipulation. - - Similar to the `children()` method, but the line-items are filtered, to only contain product line items. -* **Returns** [`Shopware\Core\Checkout\Cart\Facade\ProductsFacade`](./cart-manipulation-script-services-reference#productsfacade) - - A `ProductsFacade` containing all product line-items inside the current container as a collection. ### add() * Use the `add()` method to add an item to this container. + * **Returns** [`Shopware\Core\Checkout\Cart\Facade\ItemFacade`](./cart-manipulation-script-services-reference#itemfacade) The item that was added to the container. @@ -297,105 +280,19 @@ The ContainerFacade allows you to wrap multiple line-items inside a container li ```twig ``` +### count() -### getPrice() - -* `getPrice()` returns the calculated price of the line-item. - -* **Returns** [`Shopware\Core\Checkout\Cart\Facade\PriceFacade`](./cart-manipulation-script-services-reference#pricefacade) | `null` - - Returns the price of the line-item as a `PriceFacade` or null if the line-item has no calculated price. - -### take() - -* `take()` splits an existing line-item by a given quantity. - - It removes the given quantity from the existing line-item and returns a new line-item with exactly that quantity. -* **Returns** [`Shopware\Core\Checkout\Cart\Facade\ItemFacade`](./cart-manipulation-script-services-reference#itemfacade) | `null` - - Returns the new line-item as an `ItemFacade` or null if taking is not possible because the line-item has no sufficient quantity. -* **Arguments:** - * *`int`* **quantity**: The quantity that should be taken. - * *`string` | `null`* **key**: Optional: The id of the new line-item. A random UUID will be used if none is provided. - - Default: `null` -* **Examples:** - * Take a quantity of 2 from an existing product line-item and add it to the cart again. - - ```twig - {# @var services \Shopware\Core\Framework\Script\ServiceStubs #} - - {% do services.cart.products.add(hook.ids.get('p1'), 5) %} - - {% set product = services.cart.products.get(hook.ids.get('p1')) %} - - {% set split = product.take(2, 'new-key') %} - - {% do services.cart.products.add(split) %} - ``` - -### getId() - -* `getId()` returns the id of the line-item. - -* **Returns** `string` - - Returns the id. - -### getReferencedId() - -* `getReferenceId()` returns the id of the referenced entity of the line-item. - - E.g. for product line-items this will return the id of the referenced product. -* **Returns** `string` | `null` - - Returns the id of the referenced entity, or null if no entity is referenced. - -### getQuantity() - -* `getQuantity()` returns the quantity of the line-item. +* `count()` returns the count of line-items in this collection. + Note that it does only count the line-items directly in this collection and not child line-items of those. * **Returns** `int` - Returns the quantity. - -### getLabel() - -* `getLabel()` returns the translated label of the line-item. - -* **Returns** `string` | `null` - - Returns the translated label, or null if none exists. - -### getPayload() - -* `getPayload()` returns the payload of this line-item. - -* **Returns** [`Shopware\Core\Framework\Script\Facade\ArrayFacade`](./miscellaneous-script-services-reference#arrayfacade) - - Returns the payload as `ArrayFacade`. - -### getChildren() - -* `getChildren()` returns the child line-items of this line-item. - -* **Returns** [`Shopware\Core\Checkout\Cart\Facade\ItemsFacade`](./cart-manipulation-script-services-reference#itemsfacade) - - Returns the children as a `ItemsFacade`, that may be empty if no children exist. - -### getType() - -* `getType()` returns the type of this line-item. - - Possible types include `product`, `discount`, `container`, etc. -* **Returns** `string` - - The type of the line-item. - + The number of line-items in this collection. ### discount() * The `discount()` methods creates a new discount line-item with the given type and value. + * **Returns** [`Shopware\Core\Checkout\Cart\Facade\DiscountFacade`](./cart-manipulation-script-services-reference#discountfacade) Returns the newly created discount line-item. @@ -425,7 +322,6 @@ The ContainerFacade allows you to wrap multiple line-items inside a container li {% do services.cart.discount('my-discount', 'absolute', price, 'Fancy discount') %} ``` - * Add a relative discount to the cart. ```twig @@ -439,40 +335,103 @@ The ContainerFacade allows you to wrap multiple line-items inside a container li {% do services.cart.discount('my-discount', 'percentage', -10, 'Fancy discount') %} ``` - -### count() - -* `count()` returns the count of line-items in this collection. - - Note that it does only count the line-items directly in this collection and not child line-items of those. -* **Returns** `int` - - The number of line-items in this collection. - ### get() * `get()` returns the line-item with the given id from this collection. + * **Returns** [`Shopware\Core\Checkout\Cart\Facade\ItemFacade`](./cart-manipulation-script-services-reference#itemfacade) | `null` The line-item with the given id, or null if it does not exist. * **Arguments:** * *`string`* **id**: The id of the line-item that should be returned. +### getChildren() + +* `getChildren()` returns the child line-items of this line-item. + + +* **Returns** [`Shopware\Core\Checkout\Cart\Facade\ItemsFacade`](./cart-manipulation-script-services-reference#itemsfacade) + + Returns the children as a `ItemsFacade`, that may be empty if no children exist. +### getId() + +* `getId()` returns the id of the line-item. + + +* **Returns** `string` + + Returns the id. +### getLabel() + +* `getLabel()` returns the translated label of the line-item. + + +* **Returns** `string` | `null` + + Returns the translated label, or null if none exists. +### getPayload() + +* `getPayload()` returns the payload of this line-item. + + +* **Returns** [`Shopware\Core\Framework\Script\Facade\ArrayFacade`](./miscellaneous-script-services-reference#arrayfacade) + + Returns the payload as `ArrayFacade`. +### getPrice() + +* `getPrice()` returns the calculated price of the line-item. + + +* **Returns** [`Shopware\Core\Checkout\Cart\Facade\PriceFacade`](./cart-manipulation-script-services-reference#pricefacade) | `null` + + Returns the price of the line-item as a `PriceFacade` or null if the line-item has no calculated price. +### getQuantity() + +* `getQuantity()` returns the quantity of the line-item. + + +* **Returns** `int` + + Returns the quantity. +### getReferencedId() + +* `getReferenceId()` returns the id of the referenced entity of the line-item. + + E.g. for product line-items this will return the id of the referenced product. +* **Returns** `string` | `null` + Returns the id of the referenced entity, or null if no entity is referenced. +### getType() + +* `getType()` returns the type of this line-item. + + Possible types include `product`, `discount`, `container`, etc. +* **Returns** `string` + + The type of the line-item. ### has() * `has()` checks if a line-item with the given id exists in this collection. + * **Returns** `bool` Returns true if the given line-item or a line-item with the given id already exists in the collection, false otherwise. * **Arguments:** * *`string|\ItemFacade`* **id**: The id or a line-item that should be checked if it already exists in the collection. +### products() +* The `product()` method returns all products inside the current container for further manipulation. + + Similar to the `children()` method, but the line-items are filtered, to only contain product line items. +* **Returns** [`Shopware\Core\Checkout\Cart\Facade\ProductsFacade`](./cart-manipulation-script-services-reference#productsfacade) + + A `ProductsFacade` containing all product line-items inside the current container as a collection. ### remove() * `remove()` removes the given line-item or the line-item with the given id from this collection. + * **Arguments:** * *`string|\ItemFacade`* **id**: The id of the line-item or the line-item that should be removed. * **Examples:** @@ -483,11 +442,11 @@ The ContainerFacade allows you to wrap multiple line-items inside a container li {% do services.cart.products.remove(hook.ids.get('p1')) %} ``` - ### surcharge() * The `surcharge()` methods creates a new surcharge line-item with the given type and value. + * **Returns** [`Shopware\Core\Checkout\Cart\Facade\DiscountFacade`](./cart-manipulation-script-services-reference#discountfacade) Returns the newly created surcharge line-item. @@ -509,7 +468,6 @@ The ContainerFacade allows you to wrap multiple line-items inside a container li {% do services.cart.surcharge('my-surcharge', 'absolute', price, 'Fancy surcharge') %} ``` - * Add a relative surcharge to the cart. ```twig @@ -523,9 +481,34 @@ The ContainerFacade allows you to wrap multiple line-items inside a container li {% do services.cart.surcharge('my-surcharge', 'percentage', -10, 'Fancy discount') %} ``` +### take() -_________ +* `take()` splits an existing line-item by a given quantity. + + It removes the given quantity from the existing line-item and returns a new line-item with exactly that quantity. +* **Returns** [`Shopware\Core\Checkout\Cart\Facade\ItemFacade`](./cart-manipulation-script-services-reference#itemfacade) | `null` + + Returns the new line-item as an `ItemFacade` or null if taking is not possible because the line-item has no sufficient quantity. +* **Arguments:** + * *`int`* **quantity**: The quantity that should be taken. + * *`string` | `null`* **key**: Optional: The id of the new line-item. A random UUID will be used if none is provided. + + Default: `null` +* **Examples:** + * Take a quantity of 2 from an existing product line-item and add it to the cart again. + ```twig + {# @var services \Shopware\Core\Framework\Script\ServiceStubs #} + + {% do services.cart.products.add(hook.ids.get('p1'), 5) %} + + {% set product = services.cart.products.get(hook.ids.get('p1')) %} + + {% set split = product.take(2, 'new-key') %} + + {% do services.cart.products.add(split) %} + ``` +_________ ## [`Shopware\Core\Checkout\Cart\Facade\DiscountFacade`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Cart/Facade/DiscountFacade.php) {#discountfacade} The DiscountFacade is a wrapper around a newly created discount. @@ -535,20 +518,19 @@ Note that this wrapper is independent from the line-item that was added for this * `getId()` returns the id of the line-item that was added with this discount. + * **Returns** `string` The id of the discount line-item. - ### getLabel() * `getLabel()` returns the translated label of the line-item that was added with this discount. + * **Returns** `string` | `null` The translated label of the discount line-item. - _________ - ## [`Shopware\Core\Checkout\Cart\Facade\ErrorsFacade`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Cart/Facade/ErrorsFacade.php) {#errorsfacade} The ErrorsFacade is a wrapper around the errors of a cart. @@ -574,28 +556,26 @@ You can use it to add new errors to the cart or remove existing ones. ```twig {% do services.cart.errors.error('NO_PRODUCTS_IN_CART') %} ``` +### get() -### warning() +* The `get()` method returns the error with the given id. -* The `warning()` method adds a new error of type `warning` to the cart. + +* **Returns** [`Shopware\Core\Checkout\Cart\Error\Error`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Cart/Error/Error.php) | `null` - The warning will be displayed to the user, but the checkout won't be blocked. + The Error with the given id, null if an error with that id does not exist. * **Arguments:** - * *`string`* **key**: The snippet-key of the message that should be displayed to the user. - * *`string` | `null`* **id**: An optional id that can be used to reference the error, if none is provided the $key will be used as id. - - Default: `null` - * *`array`* **parameters**: Optional: Any parameters that the snippet for the error message may need. + * *`string`* **id**: The id of the error that should be returned. +### has() - Default: `array ( -)` -* **Examples:** - * Add a warning to the cart. +* The `has()` method, checks if an error with a given id exists. - ```twig - {% do services.cart.errors.notice('YOU_SHOULD_REALLY_ADD_PRODUCTS') %} - ``` + +* **Returns** `bool` + Returns true if an error with that key exists, false otherwise. +* **Arguments:** + * *`string`* **id**: The id of the error that should be checked. ### notice() * The `notice()` method adds a new error of type `notice` to the cart. @@ -616,19 +596,23 @@ You can use it to add new errors to the cart or remove existing ones. ```twig {% do services.cart.errors.warning('ADD_PRODUCTS_OR_GO_AWAY') %} ``` - * Add a notice to the cart with a custom id. ```twig {% do services.cart.errors.notice('YOU_SHOULD_REALLY_ADD_PRODUCTS', 'add-same-message') %} ``` - * Add a notice to the cart with parameters. ```twig {% do services.cart.errors.notice('MESSAGE_WITH_PARAMETERS', null, {'foo': 'bar'}) %} ``` +### remove() +* The `remove()` method removes the error with the given id. + + +* **Arguments:** + * *`string`* **id**: The id of the error that should be removed. ### resubmittable() * The `resubmittable()` method adds a new error of type `error` to the cart. @@ -643,125 +627,88 @@ You can use it to add new errors to the cart or remove existing ones. Default: `array ( )` +### warning() -### has() - -* The `has()` method, checks if an error with a given id exists. - -* **Returns** `bool` - - Returns true if an error with that key exists, false otherwise. -* **Arguments:** - * *`string`* **id**: The id of the error that should be checked. - -### remove() - -* The `remove()` method removes the error with the given id. +* The `warning()` method adds a new error of type `warning` to the cart. + The warning will be displayed to the user, but the checkout won't be blocked. * **Arguments:** - * *`string`* **id**: The id of the error that should be removed. - -### get() - -* The `get()` method returns the error with the given id. + * *`string`* **key**: The snippet-key of the message that should be displayed to the user. + * *`string` | `null`* **id**: An optional id that can be used to reference the error, if none is provided the $key will be used as id. -* **Returns** [`Shopware\Core\Checkout\Cart\Error\Error`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Cart/Error/Error.php) | `null` + Default: `null` + * *`array`* **parameters**: Optional: Any parameters that the snippet for the error message may need. - The Error with the given id, null if an error with that id does not exist. -* **Arguments:** - * *`string`* **id**: The id of the error that should be returned. + Default: `array ( +)` +* **Examples:** + * Add a warning to the cart. + ```twig + {% do services.cart.errors.notice('YOU_SHOULD_REALLY_ADD_PRODUCTS') %} + ``` _________ - ## [`Shopware\Core\Checkout\Cart\Facade\ItemFacade`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Cart/Facade/ItemFacade.php) {#itemfacade} The ItemFacade is a wrapper around one line-item. -### getPrice() - -* `getPrice()` returns the calculated price of the line-item. - -* **Returns** [`Shopware\Core\Checkout\Cart\Facade\PriceFacade`](./cart-manipulation-script-services-reference#pricefacade) | `null` - - Returns the price of the line-item as a `PriceFacade` or null if the line-item has no calculated price. - -### take() - -* `take()` splits an existing line-item by a given quantity. - - It removes the given quantity from the existing line-item and returns a new line-item with exactly that quantity. -* **Returns** [`Shopware\Core\Checkout\Cart\Facade\ItemFacade`](./cart-manipulation-script-services-reference#itemfacade) | `null` - Returns the new line-item as an `ItemFacade` or null if taking is not possible because the line-item has no sufficient quantity. -* **Arguments:** - * *`int`* **quantity**: The quantity that should be taken. - * *`string` | `null`* **key**: Optional: The id of the new line-item. A random UUID will be used if none is provided. +### getChildren() - Default: `null` -* **Examples:** - * Take a quantity of 2 from an existing product line-item and add it to the cart again. +* `getChildren()` returns the child line-items of this line-item. - ```twig - {# @var services \Shopware\Core\Framework\Script\ServiceStubs #} - - {% do services.cart.products.add(hook.ids.get('p1'), 5) %} - - {% set product = services.cart.products.get(hook.ids.get('p1')) %} - - {% set split = product.take(2, 'new-key') %} - - {% do services.cart.products.add(split) %} - ``` + +* **Returns** [`Shopware\Core\Checkout\Cart\Facade\ItemsFacade`](./cart-manipulation-script-services-reference#itemsfacade) + Returns the children as a `ItemsFacade`, that may be empty if no children exist. ### getId() * `getId()` returns the id of the line-item. + * **Returns** `string` Returns the id. - -### getReferencedId() - -* `getReferenceId()` returns the id of the referenced entity of the line-item. - - E.g. for product line-items this will return the id of the referenced product. -* **Returns** `string` | `null` - - Returns the id of the referenced entity, or null if no entity is referenced. - -### getQuantity() - -* `getQuantity()` returns the quantity of the line-item. - -* **Returns** `int` - - Returns the quantity. - ### getLabel() * `getLabel()` returns the translated label of the line-item. + * **Returns** `string` | `null` Returns the translated label, or null if none exists. - ### getPayload() * `getPayload()` returns the payload of this line-item. + * **Returns** [`Shopware\Core\Framework\Script\Facade\ArrayFacade`](./miscellaneous-script-services-reference#arrayfacade) Returns the payload as `ArrayFacade`. +### getPrice() -### getChildren() +* `getPrice()` returns the calculated price of the line-item. -* `getChildren()` returns the child line-items of this line-item. + +* **Returns** [`Shopware\Core\Checkout\Cart\Facade\PriceFacade`](./cart-manipulation-script-services-reference#pricefacade) | `null` -* **Returns** [`Shopware\Core\Checkout\Cart\Facade\ItemsFacade`](./cart-manipulation-script-services-reference#itemsfacade) + Returns the price of the line-item as a `PriceFacade` or null if the line-item has no calculated price. +### getQuantity() - Returns the children as a `ItemsFacade`, that may be empty if no children exist. +* `getQuantity()` returns the quantity of the line-item. + + +* **Returns** `int` + + Returns the quantity. +### getReferencedId() + +* `getReferenceId()` returns the id of the referenced entity of the line-item. + + E.g. for product line-items this will return the id of the referenced product. +* **Returns** `string` | `null` + Returns the id of the referenced entity, or null if no entity is referenced. ### getType() * `getType()` returns the type of this line-item. @@ -770,17 +717,44 @@ The ItemFacade is a wrapper around one line-item. * **Returns** `string` The type of the line-item. +### take() -_________ +* `take()` splits an existing line-item by a given quantity. + + It removes the given quantity from the existing line-item and returns a new line-item with exactly that quantity. +* **Returns** [`Shopware\Core\Checkout\Cart\Facade\ItemFacade`](./cart-manipulation-script-services-reference#itemfacade) | `null` + + Returns the new line-item as an `ItemFacade` or null if taking is not possible because the line-item has no sufficient quantity. +* **Arguments:** + * *`int`* **quantity**: The quantity that should be taken. + * *`string` | `null`* **key**: Optional: The id of the new line-item. A random UUID will be used if none is provided. + + Default: `null` +* **Examples:** + * Take a quantity of 2 from an existing product line-item and add it to the cart again. + ```twig + {# @var services \Shopware\Core\Framework\Script\ServiceStubs #} + + {% do services.cart.products.add(hook.ids.get('p1'), 5) %} + + {% set product = services.cart.products.get(hook.ids.get('p1')) %} + + {% set split = product.take(2, 'new-key') %} + + {% do services.cart.products.add(split) %} + ``` +_________ ## [`Shopware\Core\Checkout\Cart\Facade\ItemsFacade`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Cart/Facade/ItemsFacade.php) {#itemsfacade} The ItemsFacade is a wrapper around a collection of line-items. + ### add() * `add()` adds a line-item to this collection. + * **Returns** [`Shopware\Core\Checkout\Cart\Facade\ItemFacade`](./cart-manipulation-script-services-reference#itemfacade) Returns the added line-item. @@ -807,40 +781,39 @@ The ItemsFacade is a wrapper around a collection of line-items. {% do services.cart.discount('my-discount', 'absolute', price, 'Fancy discount') %} ``` +### count() +* `count()` returns the count of line-items in this collection. + + Note that it does only count the line-items directly in this collection and not child line-items of those. +* **Returns** `int` + + The number of line-items in this collection. ### get() * `get()` returns the line-item with the given id from this collection. + * **Returns** [`Shopware\Core\Checkout\Cart\Facade\ItemFacade`](./cart-manipulation-script-services-reference#itemfacade) | `null` The line-item with the given id, or null if it does not exist. * **Arguments:** * *`string`* **id**: The id of the line-item that should be returned. - -### count() - -* `count()` returns the count of line-items in this collection. - - Note that it does only count the line-items directly in this collection and not child line-items of those. -* **Returns** `int` - - The number of line-items in this collection. - ### has() * `has()` checks if a line-item with the given id exists in this collection. + * **Returns** `bool` Returns true if the given line-item or a line-item with the given id already exists in the collection, false otherwise. * **Arguments:** * *`string|\ItemFacade`* **id**: The id or a line-item that should be checked if it already exists in the collection. - ### remove() * `remove()` removes the given line-item or the line-item with the given id from this collection. + * **Arguments:** * *`string|\ItemFacade`* **id**: The id of the line-item or the line-item that should be removed. * **Examples:** @@ -851,91 +824,101 @@ The ItemsFacade is a wrapper around a collection of line-items. {% do services.cart.products.remove(hook.ids.get('p1')) %} ``` - _________ - ## [`Shopware\Core\Checkout\Cart\Facade\PriceFacade`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Cart/Facade/PriceFacade.php) {#pricefacade} The PriceFacade is a wrapper around a price. -### getTotal() -* `getTotal()` returns the total price for the line-item. +### change() -* **Returns** `float` +* `change()` allows a price overwrite of the current price scope. The provided price will be recalculated +over the quantity price calculator to consider quantity, tax rule and cash rounding configurations. - The total price as float. + +* **Arguments:** + * *[`Shopware\Core\Framework\DataAbstractionLayer\Pricing\PriceCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Pricing/PriceCollection.php)* **price**: The provided price can be a fetched price from the database or generated over the `PriceFactory` statically +* **Examples:** + * Overwrite prices with a static defined collection -### getUnit() + ```twig + {% do product.calculatedPrices.change([ + { to: 20, price: services.price.create({ 'default': { 'gross': 15, 'net': 15} }) }, + { to: 30, price: services.price.create({ 'default': { 'gross': 10, 'net': 10} }) }, + { to: null, price: services.price.create({ 'default': { 'gross': 5, 'net': 5} }) }, + ]) %} + ``` +### create() -* `getUnit()` returns the unit price for the line-item. +* `create()` creates a new `PriceCollection` based on an array of prices. - This is equivalent to the total price of the line-item with the quantity 1. -* **Returns** `float` + +* **Returns** [`Shopware\Core\Framework\DataAbstractionLayer\Pricing\PriceCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Pricing/PriceCollection.php) - The price per unit as float. + Returns the newly created `PriceCollection`. +* **Arguments:** + * *`array`* **price**: The prices for the new collection, indexed by the currency-id or iso-code of the currency. +* **Examples:** + * Create a new Price in the default currency. + + ```twig + {% set price = services.cart.price.create({ + 'default': { 'gross': 19.99, 'net': 19.99} + }) %} + ``` +### discount() + +* `discount()` allows a percentage discount calculation of the current price scope. The provided value will be ensured to be negative via `abs(value) * -1`. + + The provided discount is interpreted as a percentage value and will be applied to the unit price and the total price as well. +* **Arguments:** + * *`float`* **value**: The percentage value of the discount. The value will be ensured to be negative via `abs(value) * -1`. +* **Examples:** + * Adds a 10% discount to the existing calculated price + ```twig + {% do product.calculatedPrice.discount(10) %} + ``` ### getQuantity() * `getQuantity()` returns the quantity that was used to calculate the total price. + * **Returns** `int` Returns the quantity. - -### getTaxes() - -* `getTaxes()` returns the calculated taxes of the price. - -* **Returns** [`Shopware\Core\Checkout\Cart\Tax\Struct\CalculatedTaxCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Cart/Tax/Struct/CalculatedTaxCollection.php) - - Returns the calculated taxes. - ### getRules() * `getRules()` returns the tax rules that were used to calculate the price. + * **Returns** [`Shopware\Core\Checkout\Cart\Tax\Struct\TaxRuleCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Cart/Tax/Struct/TaxRuleCollection.php) Returns the tax rules. +### getTaxes() -### change() +* `getTaxes()` returns the calculated taxes of the price. -* `change()` allows a price overwrite of the current price scope. The provided price will be recalculated -over the quantity price calculator to consider quantity, tax rule and cash rounding configurations. + +* **Returns** [`Shopware\Core\Checkout\Cart\Tax\Struct\CalculatedTaxCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Cart/Tax/Struct/CalculatedTaxCollection.php) -* **Arguments:** - * *[`Shopware\Core\Framework\DataAbstractionLayer\Pricing\PriceCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Pricing/PriceCollection.php)* **price**: The provided price can be a fetched price from the database or generated over the `PriceFactory` statically -* **Examples:** - * Overwrite prices with a static defined collection + Returns the calculated taxes. +### getTotal() - ```twig - {% do product.calculatedPrices.change([ - { to: 20, price: services.price.create({ 'default': { 'gross': 15, 'net': 15} }) }, - { to: 30, price: services.price.create({ 'default': { 'gross': 10, 'net': 10} }) }, - { to: null, price: services.price.create({ 'default': { 'gross': 5, 'net': 5} }) }, - ]) %} - ``` +* `getTotal()` returns the total price for the line-item. -### plus() + +* **Returns** `float` -* `plus()` allows a price addition of the current price scope. The provided price will be recalculated via the quantity price calculator. + The total price as float. +### getUnit() - The provided price is interpreted as a unit price and will be added to the current unit price. - The total price is calculated afterwards considering quantity, tax rule and cash rounding configurations. -* **Arguments:** - * *[`Shopware\Core\Framework\DataAbstractionLayer\Pricing\PriceCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Pricing/PriceCollection.php)* **price**: The provided price can be a fetched price from the database or generated over the `PriceFactory` statically -* **Examples:** - * Plus a static defined price to the existing calculated price +* `getUnit()` returns the unit price for the line-item. - ```twig - {% set price = services.price.create({ - 'default': { 'gross': 1.5, 'net': 1.5} - }) %} - - {% do product.calculatedPrice.plus(price) %} - ``` + This is equivalent to the total price of the line-item with the quantity 1. +* **Returns** `float` + The price per unit as float. ### minus() * `minus()` allows a price subtraction of the current price scope. The provided price will be recalculated via the quantity price calculator. @@ -954,21 +937,24 @@ over the quantity price calculator to consider quantity, tax rule and cash round {% do product.calculatedPrice.minus(price) %} ``` +### plus() -### discount() - -* `discount()` allows a percentage discount calculation of the current price scope. The provided value will be ensured to be negative via `abs(value) * -1`. +* `plus()` allows a price addition of the current price scope. The provided price will be recalculated via the quantity price calculator. - The provided discount is interpreted as a percentage value and will be applied to the unit price and the total price as well. + The provided price is interpreted as a unit price and will be added to the current unit price. + The total price is calculated afterwards considering quantity, tax rule and cash rounding configurations. * **Arguments:** - * *`float`* **value**: The percentage value of the discount. The value will be ensured to be negative via `abs(value) * -1`. + * *[`Shopware\Core\Framework\DataAbstractionLayer\Pricing\PriceCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Pricing/PriceCollection.php)* **price**: The provided price can be a fetched price from the database or generated over the `PriceFactory` statically * **Examples:** - * Adds a 10% discount to the existing calculated price + * Plus a static defined price to the existing calculated price ```twig - {% do product.calculatedPrice.discount(10) %} + {% set price = services.price.create({ + 'default': { 'gross': 1.5, 'net': 1.5} + }) %} + + {% do product.calculatedPrice.plus(price) %} ``` - ### surcharge() * `surcharge()` allows a percentage surcharge calculation of the current price scope. The provided value will be ensured to be negative via `abs(value)`. @@ -982,35 +968,17 @@ over the quantity price calculator to consider quantity, tax rule and cash round ```twig {% do product.calculatedPrice.surcharge(10) %} ``` - -### create() - -* `create()` creates a new `PriceCollection` based on an array of prices. - -* **Returns** [`Shopware\Core\Framework\DataAbstractionLayer\Pricing\PriceCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Pricing/PriceCollection.php) - - Returns the newly created `PriceCollection`. -* **Arguments:** - * *`array`* **price**: The prices for the new collection, indexed by the currency-id or iso-code of the currency. -* **Examples:** - * Create a new Price in the default currency. - - ```twig - {% set price = services.cart.price.create({ - 'default': { 'gross': 19.99, 'net': 19.99} - }) %} - ``` - _________ - ## [services.price (`Shopware\Core\Checkout\Cart\Facade\PriceFactory`)](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Cart/Facade/PriceFactory.php) {#pricefactory} The PriceFacade is a wrapper around a price. + ### create() * `create()` creates a new `PriceCollection` based on an array of prices. + * **Returns** [`Shopware\Core\Framework\DataAbstractionLayer\Pricing\PriceCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Pricing/PriceCollection.php) Returns the newly created `PriceCollection`. @@ -1024,28 +992,11 @@ The PriceFacade is a wrapper around a price. 'default': { 'gross': 19.99, 'net': 19.99} }) %} ``` - _________ - ## [`Shopware\Core\Checkout\Cart\Facade\ProductsFacade`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Cart/Facade/ProductsFacade.php) {#productsfacade} The ProductsFacade is a wrapper around a collection of product line-items. -### get() - -* `get()` returns the product line-item with the given product id. - -* **Returns** [`Shopware\Core\Checkout\Cart\Facade\ItemFacade`](./cart-manipulation-script-services-reference#itemfacade) | `null` - - The line-item associated with the given product id, or null if it does not exist. -* **Arguments:** - * *`string`* **productId**: The id of the product, of which the line-item should be returned. -* **Examples:** - * Get a product line-item by id. - - ```twig - {% set product = services.cart.products.get(hook.ids.get('p1')) %} - ``` ### add() @@ -1066,7 +1017,14 @@ The ProductsFacade is a wrapper around a collection of product line-items. ```twig {% do services.cart.products.add(hook.ids.get('p1')) %} ``` +### count() + +* `count()` returns the count of line-items in this collection. + + Note that it does only count the line-items directly in this collection and not child line-items of those. +* **Returns** `int` + The number of line-items in this collection. ### create() * `create()` creates a new product line-item for the product with the given id in the given quantity. @@ -1080,30 +1038,37 @@ The ProductsFacade is a wrapper around a collection of product line-items. * *`int`* **quantity**: Optionally provide the quantity with which the product line-item should be created, defaults to 1. Default: `1` +### get() -### count() - -* `count()` returns the count of line-items in this collection. +* `get()` returns the product line-item with the given product id. - Note that it does only count the line-items directly in this collection and not child line-items of those. -* **Returns** `int` + +* **Returns** [`Shopware\Core\Checkout\Cart\Facade\ItemFacade`](./cart-manipulation-script-services-reference#itemfacade) | `null` - The number of line-items in this collection. + The line-item associated with the given product id, or null if it does not exist. +* **Arguments:** + * *`string`* **productId**: The id of the product, of which the line-item should be returned. +* **Examples:** + * Get a product line-item by id. + ```twig + {% set product = services.cart.products.get(hook.ids.get('p1')) %} + ``` ### has() * `has()` checks if a line-item with the given id exists in this collection. + * **Returns** `bool` Returns true if the given line-item or a line-item with the given id already exists in the collection, false otherwise. * **Arguments:** * *`string|\ItemFacade`* **id**: The id or a line-item that should be checked if it already exists in the collection. - ### remove() * `remove()` removes the given line-item or the line-item with the given id from this collection. + * **Arguments:** * *`string|\ItemFacade`* **id**: The id of the line-item or the line-item that should be removed. * **Examples:** @@ -1114,13 +1079,12 @@ The ProductsFacade is a wrapper around a collection of product line-items. {% do services.cart.products.remove(hook.ids.get('p1')) %} ``` - _________ - ## [`Shopware\Core\Checkout\Cart\Facade\StatesFacade`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Cart/Facade/StatesFacade.php) {#statesfacade} The StatesFacade allows access to the current cart states and functions. + ### add() * `add()` allows you to add one or multiple states as string values to the cart. @@ -1128,30 +1092,29 @@ The StatesFacade allows access to the current cart states and functions. This can be useful to check if your script did already run and did some manipulations to the cart. * **Arguments:** * *`string`* **states**: One or more strings that will be stored on the cart. +### get() -### remove() - -* `remove()` removes the given state from the cart, if it existed. +* `get()` returns all states that are present on the cart. -* **Arguments:** - * *`string`* **state**: The state that should be removed. + +* **Returns** `array` + An array containing all current states of the cart. ### has() * `has()` allows you to check if one or more states are present on the cart. + * **Returns** `bool` Returns true if at least one of the passed states is present on the cart, false otherwise. * **Arguments:** * *`string`* **states**: One or more strings that should be checked. +### remove() -### get() - -* `get()` returns all states that are present on the cart. - -* **Returns** `array` - - An array containing all current states of the cart. +* `remove()` removes the given state from the cart, if it existed. + +* **Arguments:** + * *`string`* **state**: The state that should be removed. _________ diff --git a/resources/references/app-reference/script-reference/custom-endpoint-script-services-reference.md b/resources/references/app-reference/script-reference/custom-endpoint-script-services-reference.md index e8a6c7be2a..2827a829ee 100644 --- a/resources/references/app-reference/script-reference/custom-endpoint-script-services-reference.md +++ b/resources/references/app-reference/script-reference/custom-endpoint-script-services-reference.md @@ -12,10 +12,12 @@ nav: The `cache` service allows you to invalidate the cache if some entity is updated. + ### invalidate() * `invalidate()` allows you to invalidate all cache entries with the given tag. + * **Arguments:** * *`array`* **tags**: The tags for which all cache entries should be invalidated as array. * **Examples:** @@ -24,7 +26,6 @@ The `cache` service allows you to invalidate the cache if some entity is updated ```twig {% do services.cache.invalidate(['my-tag']) %} ``` - * Build tags based on written entities and invalidate those tags. ```twig @@ -41,7 +42,6 @@ The `cache` service allows you to invalidate the cache if some entity is updated {% do services.cache.invalidate(tags) %} ``` - * Build tags if products with a specific property is created and invalidate those tags. ```twig @@ -59,46 +59,17 @@ The `cache` service allows you to invalidate the cache if some entity is updated {% do services.cache.invalidate(tags) %} ``` - _________ - ## [services.writer (`Shopware\Core\Framework\DataAbstractionLayer\Facade\RepositoryWriterFacade`)](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Facade/RepositoryWriterFacade.php) {#repositorywriterfacade} The `writer` service allows you to write data, that is stored inside shopware. Keep in mind that your app needs to have the correct permissions for the data it writes through this service. -### upsert() - -* The `upsert()` method allows you to create or update entities inside the database. - - If you pass an `id` in the payload it will do an update if an entity with that `id` already exists, otherwise it will be a create. -* **Returns** [`Shopware\Core\Framework\DataAbstractionLayer\Event\EntityWrittenContainerEvent`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Event/EntityWrittenContainerEvent.php) - - The WriteEvents that were generated by executing the `upsert()`. -* **Arguments:** - * *`string`* **entityName**: The name of the entity you want to upsert, e.g. `product` or `media`. - * *`array`* **payload**: The payload you want to upsert, as a list of associative arrays, where each associative array represents the payload for one entity. -* **Examples:** - * Create a new entity. - - ```twig - {% do services.writer.upsert('tax', [ - { 'name': 'new Tax', 'taxRate': 99.9 } - ]) %} - ``` - - * Update an existing entity. - - ```twig - {% do services.writer.upsert('product', [ - { 'id': hook.productId, 'active': true } - ]) %} - ``` - ### delete() * The `delete()` method allows you to delete entities from the database. + * **Returns** [`Shopware\Core\Framework\DataAbstractionLayer\Event\EntityWrittenContainerEvent`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Event/EntityWrittenContainerEvent.php) The WriteEvents that were generated by executing the `delete()`. @@ -113,11 +84,11 @@ Keep in mind that your app needs to have the correct permissions for the data it { 'id': hook.productId } ]) %} ``` - ### sync() * The `sync()` method allows you to execute updates and deletes to multiple entities in one method call. + * **Returns** [`Shopware\Core\Framework\Api\Sync\SyncResult`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Api/Sync/SyncResult.php) The result of the `sync()`. @@ -146,17 +117,43 @@ Keep in mind that your app needs to have the correct permissions for the data it {% do services.writer.sync(payload) %} ``` +### upsert() -_________ +* The `upsert()` method allows you to create or update entities inside the database. + If you pass an `id` in the payload it will do an update if an entity with that `id` already exists, otherwise it will be a create. +* **Returns** [`Shopware\Core\Framework\DataAbstractionLayer\Event\EntityWrittenContainerEvent`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Event/EntityWrittenContainerEvent.php) + + The WriteEvents that were generated by executing the `upsert()`. +* **Arguments:** + * *`string`* **entityName**: The name of the entity you want to upsert, e.g. `product` or `media`. + * *`array`* **payload**: The payload you want to upsert, as a list of associative arrays, where each associative array represents the payload for one entity. +* **Examples:** + * Create a new entity. + + ```twig + {% do services.writer.upsert('tax', [ + { 'name': 'new Tax', 'taxRate': 99.9 } + ]) %} + ``` + * Update an existing entity. + + ```twig + {% do services.writer.upsert('product', [ + { 'id': hook.productId, 'active': true } + ]) %} + ``` +_________ ## [services.response (`Shopware\Core\Framework\Script\Api\ScriptResponseFactoryFacade`)](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Script/Api/ScriptResponseFactoryFacade.php) {#scriptresponsefactoryfacade} The `response` service allows you to create HTTP-Responses. + ### json() * The `json()` method allows you to create a JSON-Response. + * **Returns** [`Shopware\Core\Framework\Script\Api\ScriptResponse`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Script/Api/ScriptResponse.php) The created response object, remember to assign it to the hook with `hook.setResponse()`. @@ -172,7 +169,6 @@ The `response` service allows you to create HTTP-Responses. {% set response = services.response.json({ 'foo': 'bar' }) %} {% do hook.setResponse(response) %} ``` - * Search for products and return them in a JsonResponse. ```twig @@ -182,7 +178,6 @@ The `response` service allows you to create HTTP-Responses. {% set response = services.response.json({ 'products': products }) %} {% do hook.setResponse(response) %} ``` - * Provide a response to a ActionButtons request from the administration. ```twig @@ -198,11 +193,11 @@ The `response` service allows you to create HTTP-Responses. {% do hook.setResponse(response) %} ``` - ### redirect() * The `redirect()` method allows you to create a RedirectResponse. + * **Returns** [`Shopware\Core\Framework\Script\Api\ScriptResponse`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Script/Api/ScriptResponse.php) The created response object, remember to assign it to the hook with `hook.setResponse()`. @@ -219,14 +214,12 @@ The `response` service allows you to create HTTP-Responses. {% set response = services.response.redirect('api.product.detail', { 'path': productId }) %} {% do hook.setResponse(response) %} ``` - * Redirect to a storefront page. ```twig {% set response = services.response.redirect('frontend.detail.page', { 'productId': productId }) %} {% do hook.setResponse(response) %} ``` - ### render() * The `render()` method allows you to render a twig view with the parameters you provide and create a StorefrontResponse. @@ -255,5 +248,4 @@ The `response` service allows you to create HTTP-Responses. {% do hook.setResponse(response) %} ``` - _________ diff --git a/resources/references/app-reference/script-reference/data-loading-script-services-reference.md b/resources/references/app-reference/script-reference/data-loading-script-services-reference.md index 3b520e2a7c..e3507020ca 100644 --- a/resources/references/app-reference/script-reference/data-loading-script-services-reference.md +++ b/resources/references/app-reference/script-reference/data-loading-script-services-reference.md @@ -13,10 +13,71 @@ nav: The `repository` service allows you to query data, that is stored inside shopware. Keep in mind that your app needs to have the correct permissions for the data it queries through this service. +### aggregate() + +* The `aggregate()` method allows you to execute aggregations specified in the given criteria. + + +* **Returns** [`Shopware\Core\Framework\DataAbstractionLayer\Search\AggregationResult\AggregationResultCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Search/AggregationResult/AggregationResultCollection.php) + + A `AggregationResultCollection` including the results of the aggregations you specified in the criteria. +* **Arguments:** + * *`string`* **entityName**: The name of the Entity you want to aggregate data on, e.g. `product` or `media`. + * *`array`* **criteria**: The criteria that define your aggregations. +* **Examples:** + * Aggregate data for multiple entities, e.g. the sum of the gross price of all products. + + ```twig + {% set page = hook.page %} + {# @var page \Shopware\Storefront\Page\Page #} + + {% set criteria = { + 'aggregations': [ + { 'name': 'sumOfPrices', 'type': 'sum', 'field': 'price.gross' } + ] + } %} + + {% set sumResult = services.repository.aggregate('product', criteria).get('sumOfPrices') %} + + {% do page.addArrayExtension('myProductAggregations', { + 'sum': sumResult.getSum + }) %} + ``` +### ids() + +* The `ids()` method allows you to search for the Ids of Entities that match a given criteria. + + +* **Returns** [`Shopware\Core\Framework\DataAbstractionLayer\Search\IdSearchResult`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Search/IdSearchResult.php) + + A `IdSearchResult` including all entity-ids that matched your criteria. +* **Arguments:** + * *`string`* **entityName**: The name of the Entity you want to search for, e.g. `product` or `media`. + * *`array`* **criteria**: The criteria used for your search. +* **Examples:** + * Get the Ids of products with the given ProductNumber. + + ```twig + {% set page = hook.page %} + {# @var page \Shopware\Storefront\Page\Page #} + + {% set criteria = { + 'filter': [ + { 'field': 'productNumber', 'type': 'equals', 'value': 'p1' } + ] + } %} + + {% set productIds = services.repository.ids('product', criteria).ids %} + + {% do page.addArrayExtension('myProductIds', { + 'ids': productIds + }) %} + ``` ### search() * The `search()` method allows you to search for Entities that match a given criteria. + * **Returns** [`Shopware\Core\Framework\DataAbstractionLayer\Search\EntitySearchResult`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Search/EntitySearchResult.php) A `EntitySearchResult` including all entities that matched your criteria. @@ -38,7 +99,6 @@ Keep in mind that your app needs to have the correct permissions for the data it {% do page.addExtension('myProduct', product) %} ``` - * Filter the search result. ```twig @@ -55,7 +115,6 @@ Keep in mind that your app needs to have the correct permissions for the data it {% do page.addExtension('myProduct', product) %} ``` - * Add associations that should be included in the result. ```twig @@ -74,82 +133,81 @@ Keep in mind that your app needs to have the correct permissions for the data it {% do page.addExtension('myProduct', product) %} {% do page.addExtension('myManufacturer', product.manufacturer) %} ``` +_________ +## [services.store (`Shopware\Core\Framework\DataAbstractionLayer\Facade\SalesChannelRepositoryFacade`)](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Facade/SalesChannelRepositoryFacade.php) {#saleschannelrepositoryfacade} -### ids() +The `store` service can be used to access publicly available `store-api` data. +As the data is publicly available your app does not need any additional permissions to use this service, +however querying data and also loading associations is restricted to the entities that are also available through the `store-api`. -* The `ids()` method allows you to search for the Ids of Entities that match a given criteria. +Notice that the returned entities are already processed for the storefront, +this means that e.g. product prices are already calculated based on the current context. -* **Returns** [`Shopware\Core\Framework\DataAbstractionLayer\Search\IdSearchResult`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Search/IdSearchResult.php) +### aggregate() - A `IdSearchResult` including all entity-ids that matched your criteria. +* The `aggregate()` method allows you to execute aggregations specified in the given criteria. + + +* **Returns** [`Shopware\Core\Framework\DataAbstractionLayer\Search\AggregationResult\AggregationResultCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Search/AggregationResult/AggregationResultCollection.php) + + A `AggregationResultCollection` including the results of the aggregations you specified in the criteria. * **Arguments:** - * *`string`* **entityName**: The name of the Entity you want to search for, e.g. `product` or `media`. - * *`array`* **criteria**: The criteria used for your search. + * *`string`* **entityName**: The name of the Entity you want to aggregate data on, e.g. `product` or `media`. + * *`array`* **criteria**: The criteria that define your aggregations. * **Examples:** - * Get the Ids of products with the given ProductNumber. + * Aggregate data for multiple entities, e.g. the sum of the children of all products. ```twig {% set page = hook.page %} {# @var page \Shopware\Storefront\Page\Page #} {% set criteria = { - 'filter': [ - { 'field': 'productNumber', 'type': 'equals', 'value': 'p1' } + 'aggregations': [ + { 'name': 'sumOfChildren', 'type': 'sum', 'field': 'childCount' } ] } %} - {% set productIds = services.repository.ids('product', criteria).ids %} + {% set sumResult = services.store.aggregate('product', criteria).get('sumOfChildren') %} - {% do page.addArrayExtension('myProductIds', { - 'ids': productIds + {% do page.addArrayExtension('myProductAggregations', { + 'sum': sumResult.getSum }) %} ``` +### ids() -### aggregate() - -* The `aggregate()` method allows you to execute aggregations specified in the given criteria. +* The `ids()` method allows you to search for the Ids of Entities that match a given criteria. -* **Returns** [`Shopware\Core\Framework\DataAbstractionLayer\Search\AggregationResult\AggregationResultCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Search/AggregationResult/AggregationResultCollection.php) + +* **Returns** [`Shopware\Core\Framework\DataAbstractionLayer\Search\IdSearchResult`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Search/IdSearchResult.php) - A `AggregationResultCollection` including the results of the aggregations you specified in the criteria. + A `IdSearchResult` including all entity-ids that matched your criteria. * **Arguments:** - * *`string`* **entityName**: The name of the Entity you want to aggregate data on, e.g. `product` or `media`. - * *`array`* **criteria**: The criteria that define your aggregations. + * *`string`* **entityName**: The name of the Entity you want to search for, e.g. `product` or `media`. + * *`array`* **criteria**: The criteria used for your search. * **Examples:** - * Aggregate data for multiple entities, e.g. the sum of the gross price of all products. + * Get the Ids of products with the given ProductNumber. ```twig {% set page = hook.page %} {# @var page \Shopware\Storefront\Page\Page #} {% set criteria = { - 'aggregations': [ - { 'name': 'sumOfPrices', 'type': 'sum', 'field': 'price.gross' } + 'filter': [ + { 'field': 'productNumber', 'type': 'equals', 'value': 'p1' } ] } %} - {% set sumResult = services.repository.aggregate('product', criteria).get('sumOfPrices') %} + {% set productIds = services.store.ids('product', criteria).ids %} - {% do page.addArrayExtension('myProductAggregations', { - 'sum': sumResult.getSum + {% do page.addArrayExtension('myProductIds', { + 'ids': productIds }) %} ``` - -_________ - -## [services.store (`Shopware\Core\Framework\DataAbstractionLayer\Facade\SalesChannelRepositoryFacade`)](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Facade/SalesChannelRepositoryFacade.php) {#saleschannelrepositoryfacade} - -The `store` service can be used to access publicly available `store-api` data. -As the data is publicly available your app does not need any additional permissions to use this service, -however querying data and also loading associations is restricted to the entities that are also available through the `store-api`. - -Notice that the returned entities are already processed for the storefront, -this means that e.g. product prices are already calculated based on the current context. - ### search() * The `search()` method allows you to search for Entities that match a given criteria. + * **Returns** [`Shopware\Core\Framework\DataAbstractionLayer\Search\EntitySearchResult`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Search/EntitySearchResult.php) A `EntitySearchResult` including all entities that matched your criteria. @@ -171,7 +229,6 @@ this means that e.g. product prices are already calculated based on the current {% do page.addExtension('myProduct', product) %} ``` - * Filter the search result. ```twig @@ -188,7 +245,6 @@ this means that e.g. product prices are already calculated based on the current {% do page.addExtension('myProduct', product) %} ``` - * Add associations that should be included in the result. ```twig @@ -207,65 +263,4 @@ this means that e.g. product prices are already calculated based on the current {% do page.addExtension('myProduct', product) %} {% do page.addExtension('myManufacturer', product.manufacturer) %} ``` - -### ids() - -* The `ids()` method allows you to search for the Ids of Entities that match a given criteria. - -* **Returns** [`Shopware\Core\Framework\DataAbstractionLayer\Search\IdSearchResult`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Search/IdSearchResult.php) - - A `IdSearchResult` including all entity-ids that matched your criteria. -* **Arguments:** - * *`string`* **entityName**: The name of the Entity you want to search for, e.g. `product` or `media`. - * *`array`* **criteria**: The criteria used for your search. -* **Examples:** - * Get the Ids of products with the given ProductNumber. - - ```twig - {% set page = hook.page %} - {# @var page \Shopware\Storefront\Page\Page #} - - {% set criteria = { - 'filter': [ - { 'field': 'productNumber', 'type': 'equals', 'value': 'p1' } - ] - } %} - - {% set productIds = services.store.ids('product', criteria).ids %} - - {% do page.addArrayExtension('myProductIds', { - 'ids': productIds - }) %} - ``` - -### aggregate() - -* The `aggregate()` method allows you to execute aggregations specified in the given criteria. - -* **Returns** [`Shopware\Core\Framework\DataAbstractionLayer\Search\AggregationResult\AggregationResultCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Search/AggregationResult/AggregationResultCollection.php) - - A `AggregationResultCollection` including the results of the aggregations you specified in the criteria. -* **Arguments:** - * *`string`* **entityName**: The name of the Entity you want to aggregate data on, e.g. `product` or `media`. - * *`array`* **criteria**: The criteria that define your aggregations. -* **Examples:** - * Aggregate data for multiple entities, e.g. the sum of the children of all products. - - ```twig - {% set page = hook.page %} - {# @var page \Shopware\Storefront\Page\Page #} - - {% set criteria = { - 'aggregations': [ - { 'name': 'sumOfChildren', 'type': 'sum', 'field': 'childCount' } - ] - } %} - - {% set sumResult = services.store.aggregate('product', criteria).get('sumOfChildren') %} - - {% do page.addArrayExtension('myProductAggregations', { - 'sum': sumResult.getSum - }) %} - ``` - _________ diff --git a/resources/references/app-reference/script-reference/miscellaneous-script-services-reference.md b/resources/references/app-reference/script-reference/miscellaneous-script-services-reference.md index d4755669eb..21207bfbc8 100644 --- a/resources/references/app-reference/script-reference/miscellaneous-script-services-reference.md +++ b/resources/references/app-reference/script-reference/miscellaneous-script-services-reference.md @@ -12,7 +12,6 @@ nav: The `request` service allows you to access the current request in the script Examples: - ```twig {% block response %} {% if services.request.method != "POST" %} @@ -28,54 +27,54 @@ Examples: {% endblock %} ``` -### ip() +### cookies() -* The ip method returns the real client ip address +* The method `cookies` returns all request cookies as an array. -* **Returns** `string` | `null` + +* **Returns** `array` - request client ip address + request cookies +### headers() -### scheme() +* The method `headers` returns all request headers as an array. -* The scheme method returns the request scheme + It is possible to access only the following headers: content-type, content-length, accept, accept-language, user-agent, referer +* **Returns** `array` -* **Returns** `string` + request headers +### ip() - request scheme +* The ip method returns the real client ip address + + +* **Returns** `string` | `null` + request client ip address ### method() * The method returns the request method in upper case + * **Returns** `string` request method in upper case - -### uri() - -* The method `uri` returns the request uri with the resolved url - -* **Returns** `string` - - request uri - ### pathInfo() * The method `pathInfo` returns the request path info. The path info can be also an internal link when a seo url is used. + * **Returns** `string` request path info - ### query() * The method `query` returns all query parameters as an array + * **Returns** `array` request query parameters - ### request() * The method `request` returns all post parameters as an array. @@ -84,32 +83,58 @@ Examples: * **Returns** `array` request post parameters +### scheme() -### headers() +* The scheme method returns the request scheme -* The method `headers` returns all request headers as an array. + +* **Returns** `string` - It is possible to access only the following headers: content-type, content-length, accept, accept-language, user-agent, referer -* **Returns** `array` + request scheme +### uri() - request headers +* The method `uri` returns the request uri with the resolved url -### cookies() + +* **Returns** `string` -* The method `cookies` returns all request cookies as an array. + request uri +_________ +## [services.acl (`Shopware\Core\Framework\Script\Api\AclFacade`)](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Script/Api/AclFacade.php) {#aclfacade} -* **Returns** `array` +The `acl` service allows you to check if your app has been granted the specified privilege. - request cookies -_________ +### can() + +* The `can()` method allows you to check if your app has been granted the specified privilege. + + +* **Returns** `bool` + Returns `true` if the privilege has been granted, `false` otherwise. +* **Arguments:** + * *`string`* **privilege**: The privilege you wish to check +* **Examples:** + * Check for the `product:read` permission and query a product if the permission is granted. + + ```twig + {% set canReadProduct = services.acl.can('product:read') %} + {% if canReadProduct %} + {% set criteria = { + 'ids': [ hook.productId ] + } %} + + {% set product = services.repository.search('product', criteria).first %} + {% do page.addExtension('myProduct', product) %} + {% endif %} + ``` +_________ ## [`Shopware\Core\Framework\Script\Facade\ArrayFacade`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Script/Facade/ArrayFacade.php) {#arrayfacade} The ArrayFacade acts as a wrapper around an array and allows easier manipulation of arrays inside scripts. An array facade can also be accessed like a "normal" array inside twig. Examples: - ```twig {% do array.push('test') %} @@ -122,66 +147,63 @@ Examples: {% foreach array as key => value %} ``` -### set() +### all() -* `set()` adds a new element to the array using the given key. +* `all()` function returns all elements of this array. + + +* **Returns** `array` + + Returns all elements of this array. +### count() +* `count()` returns the count of elements inside this array. + + +* **Returns** `int` + + Returns the count of elements. +### merge() + +* `merge()` recursively merges the array with the given array. + + * **Arguments:** - * *`string|int`* **key**: The array key. - * *`mixed`* **value**: The value that should be added. + * *`array<string|int,mixed>|\ArrayFacade`* **array**: The array that should be merged with this array. Either a plain `array` or another `ArrayFacade`. * **Examples:** - * Add a new element with key `test` and value 1. + * Merge two arrays. ```twig - {% set product = services.cart.products.get(hook.ids.get('p1')) %} + {% set my_array = array({'bar': 'foo', 'baz': true}) %} - {% do product.payload.set('test', 1) %} + {% do product.payload.merge(my_array) %} ``` - ### push() * `push()` adds a new value to the end of the array. + * **Arguments:** * *`mixed`* **value**: The value that should be added. - -### removeBy() - -* `removeBy()` removes the value at the given index from the array. - -* **Arguments:** - * *`string|int`* **index**: The index that should be removed. - ### remove() * `remove()` removes the given value from the array. It does nothing if the provided value does not exist in the array. + * **Arguments:** * *`mixed`* **value**: The value that should be removed. +### removeBy() -### reset() - -* `reset()` removes all entries from the array. - -### merge() - -* `merge()` recursively merges the array with the given array. +* `removeBy()` removes the value at the given index from the array. + * **Arguments:** - * *`array<string|int,mixed>|\ArrayFacade`* **array**: The array that should be merged with this array. Either a plain `array` or another `ArrayFacade`. -* **Examples:** - * Merge two arrays. - - ```twig - {% set my_array = array({'bar': 'foo', 'baz': true}) %} - - {% do product.payload.merge(my_array) %} - ``` - + * *`string|int`* **index**: The index that should be removed. ### replace() * `replace()` recursively replaces elements from the given array into this array. + * **Arguments:** * *`array<string|int,mixed>|\ArrayFacade`* **array**: The array from which the elements should be replaced into this array. Either a plain `array` or another `ArrayFacade`. * **Examples:** @@ -192,65 +214,69 @@ Examples: {% do product.payload.replace(second) %} ``` +### reset() -### count() - -* `count()` returns the count of elements inside this array. - -* **Returns** `int` - - Returns the count of elements. - -### all() +* `reset()` removes all entries from the array. -* `all()` function returns all elements of this array. + +### set() -* **Returns** `array` +* `set()` adds a new element to the array using the given key. - Returns all elements of this array. + +* **Arguments:** + * *`string|int`* **key**: The array key. + * *`mixed`* **value**: The value that should be added. +* **Examples:** + * Add a new element with key `test` and value 1. + ```twig + {% set product = services.cart.products.get(hook.ids.get('p1')) %} + + {% do product.payload.set('test', 1) %} + ``` _________ - ## [services.config (`Shopware\Core\System\SystemConfig\Facade\SystemConfigFacade`)](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SystemConfig/Facade/SystemConfigFacade.php) {#systemconfigfacade} The `config` service allows you to access the shop's and your app's configuration values. -### get() -* The `get()` method allows you to access all config values of the store. +### app() - Notice that your app needs the `system_config:read` privilege to use this method. -* **Returns** `array|bool|float|int|string|null` +* The `app()` method allows you to access the config values your app's configuration. + Notice that your app does not need any additional privileges to use this method, as you can only access your own app's configuration. +* **Returns** `array<string,mixed>|bool|float|int|string|null` + + * **Arguments:** - * *`string`* **key**: The key of the configuration value e.g. `core.listing.defaultSorting`. + * *`string`* **key**: The name of the configuration value specified in the config.xml e.g. `exampleTextField`. * *`string` | `null`* **salesChannelId**: The SalesChannelId if you need the config value for a specific SalesChannel, if you don't provide a SalesChannelId, the one of the current Context is used as default. Default: `null` * **Examples:** - * Read an arbitrary system_config value. + * Read your app's config value. ```twig - {% set systemConfig = services.config.get('core.listing.productsPerPage') %} + {% set appConfig = services.config.app('app_config') %} ``` +### get() -### app() - -* The `app()` method allows you to access the config values your app's configuration. +* The `get()` method allows you to access all config values of the store. - Notice that your app does not need any additional privileges to use this method, as you can only access your own app's configuration. -* **Returns** `array|bool|float|int|string|null` + Notice that your app needs the `system_config:read` privilege to use this method. +* **Returns** `array<string,mixed>|bool|float|int|string|null` + * **Arguments:** - * *`string`* **key**: The name of the configuration value specified in the config.xml e.g. `exampleTextField`. + * *`string`* **key**: The key of the configuration value e.g. `core.listing.defaultSorting`. * *`string` | `null`* **salesChannelId**: The SalesChannelId if you need the config value for a specific SalesChannel, if you don't provide a SalesChannelId, the one of the current Context is used as default. Default: `null` * **Examples:** - * Read your app's config value. + * Read an arbitrary system_config value. ```twig - {% set appConfig = services.config.app('app_config') %} + {% set systemConfig = services.config.get('core.listing.productsPerPage') %} ``` - _________ diff --git a/resources/references/app-reference/script-reference/product-script-services-reference.md b/resources/references/app-reference/script-reference/product-script-services-reference.md index 862ff6dd88..94c03d2ec7 100644 --- a/resources/references/app-reference/script-reference/product-script-services-reference.md +++ b/resources/references/app-reference/script-reference/product-script-services-reference.md @@ -12,22 +12,13 @@ nav: The CheapestPriceFacade is a wrapper around the cheapest price of the product. -### reset() - -* `reset()` allows to reset the cheapest price to the original price of the product. - -* **Examples:** - * Reset the product price to default - - ```twig - {% do variant.calculatedCheapestPrice.change(price) %} - ``` ### change() * `change()` allows to overwrite the cheapest price of the current price scope. The provided price will be recalculated over the quantity price calculator to consider quantity, tax rule and cash rounding configurations. + * **Arguments:** * *`\PriceFacade|\PriceCollection|\CalculatedPrice|null` | `null`* **price**: You can provide different values to overwrite the cheapest price. In case of null, it uses the original single price of the product. * *`bool`* **range**: Allows to switch the `hasRange` attribute of the cheapest price @@ -43,112 +34,134 @@ over the quantity price calculator to consider quantity, tax rule and cash round {% do variant.calculatedCheapestPrice.change(price) %} ``` - * Overwrite the cheapest price with the original price ```twig {% do variant.calculatedCheapestPrice.plus(price) %} ``` - * Discount the cheapest price by 10% ```twig {% do variant.calculatedCheapestPrice.discount(10) %} ``` +### create() -### getTotal() - -* `getTotal()` returns the total price for the line-item. - -* **Returns** `float` +* `create()` creates a new `PriceCollection` based on an array of prices. - The total price as float. + +* **Returns** [`Shopware\Core\Framework\DataAbstractionLayer\Pricing\PriceCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Pricing/PriceCollection.php) -### getUnit() + Returns the newly created `PriceCollection`. +* **Arguments:** + * *`array`* **price**: The prices for the new collection, indexed by the currency-id or iso-code of the currency. +* **Examples:** + * Create a new Price in the default currency. -* `getUnit()` returns the unit price for the line-item. + ```twig + {% set price = services.cart.price.create({ + 'default': { 'gross': 19.99, 'net': 19.99} + }) %} + ``` +### discount() - This is equivalent to the total price of the line-item with the quantity 1. -* **Returns** `float` +* `discount()` allows a percentage discount calculation of the current price scope. The provided value will be ensured to be negative via `abs(value) * -1`. - The price per unit as float. + The provided discount is interpreted as a percentage value and will be applied to the unit price and the total price as well. +* **Arguments:** + * *`float`* **value**: The percentage value of the discount. The value will be ensured to be negative via `abs(value) * -1`. +* **Examples:** + * Adds a 10% discount to the existing calculated price + ```twig + {% do product.calculatedPrice.discount(10) %} + ``` ### getQuantity() * `getQuantity()` returns the quantity that was used to calculate the total price. + * **Returns** `int` Returns the quantity. +### getRules() + +* `getRules()` returns the tax rules that were used to calculate the price. + + +* **Returns** [`Shopware\Core\Checkout\Cart\Tax\Struct\TaxRuleCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Cart/Tax/Struct/TaxRuleCollection.php) + Returns the tax rules. ### getTaxes() * `getTaxes()` returns the calculated taxes of the price. + * **Returns** [`Shopware\Core\Checkout\Cart\Tax\Struct\CalculatedTaxCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Cart/Tax/Struct/CalculatedTaxCollection.php) Returns the calculated taxes. +### getTotal() -### getRules() +* `getTotal()` returns the total price for the line-item. -* `getRules()` returns the tax rules that were used to calculate the price. + +* **Returns** `float` -* **Returns** [`Shopware\Core\Checkout\Cart\Tax\Struct\TaxRuleCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Cart/Tax/Struct/TaxRuleCollection.php) + The total price as float. +### getUnit() - Returns the tax rules. +* `getUnit()` returns the unit price for the line-item. -### plus() + This is equivalent to the total price of the line-item with the quantity 1. +* **Returns** `float` -* `plus()` allows a price addition of the current price scope. The provided price will be recalculated via the quantity price calculator. + The price per unit as float. +### minus() - The provided price is interpreted as a unit price and will be added to the current unit price. +* `minus()` allows a price subtraction of the current price scope. The provided price will be recalculated via the quantity price calculator. + + The provided price is interpreted as a unit price and will reduce to the current unit price. The total price is calculated afterwards considering quantity, tax rule and cash rounding configurations. * **Arguments:** * *[`Shopware\Core\Framework\DataAbstractionLayer\Pricing\PriceCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Pricing/PriceCollection.php)* **price**: The provided price can be a fetched price from the database or generated over the `PriceFactory` statically * **Examples:** - * Plus a static defined price to the existing calculated price + * Minus a static defined price to the existing calculated price ```twig {% set price = services.price.create({ 'default': { 'gross': 1.5, 'net': 1.5} }) %} - {% do product.calculatedPrice.plus(price) %} + {% do product.calculatedPrice.minus(price) %} ``` +### plus() -### minus() - -* `minus()` allows a price subtraction of the current price scope. The provided price will be recalculated via the quantity price calculator. +* `plus()` allows a price addition of the current price scope. The provided price will be recalculated via the quantity price calculator. - The provided price is interpreted as a unit price and will reduce to the current unit price. + The provided price is interpreted as a unit price and will be added to the current unit price. The total price is calculated afterwards considering quantity, tax rule and cash rounding configurations. * **Arguments:** * *[`Shopware\Core\Framework\DataAbstractionLayer\Pricing\PriceCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Pricing/PriceCollection.php)* **price**: The provided price can be a fetched price from the database or generated over the `PriceFactory` statically * **Examples:** - * Minus a static defined price to the existing calculated price + * Plus a static defined price to the existing calculated price ```twig {% set price = services.price.create({ 'default': { 'gross': 1.5, 'net': 1.5} }) %} - {% do product.calculatedPrice.minus(price) %} + {% do product.calculatedPrice.plus(price) %} ``` +### reset() -### discount() - -* `discount()` allows a percentage discount calculation of the current price scope. The provided value will be ensured to be negative via `abs(value) * -1`. +* `reset()` allows to reset the cheapest price to the original price of the product. - The provided discount is interpreted as a percentage value and will be applied to the unit price and the total price as well. -* **Arguments:** - * *`float`* **value**: The percentage value of the discount. The value will be ensured to be negative via `abs(value) * -1`. + * **Examples:** - * Adds a 10% discount to the existing calculated price + * Reset the product price to default ```twig - {% do product.calculatedPrice.discount(10) %} + {% do variant.calculatedCheapestPrice.change(price) %} ``` - ### surcharge() * `surcharge()` allows a percentage surcharge calculation of the current price scope. The provided value will be ensured to be negative via `abs(value)`. @@ -162,42 +175,20 @@ over the quantity price calculator to consider quantity, tax rule and cash round ```twig {% do product.calculatedPrice.surcharge(10) %} ``` - -### create() - -* `create()` creates a new `PriceCollection` based on an array of prices. - -* **Returns** [`Shopware\Core\Framework\DataAbstractionLayer\Pricing\PriceCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Pricing/PriceCollection.php) - - Returns the newly created `PriceCollection`. -* **Arguments:** - * *`array`* **price**: The prices for the new collection, indexed by the currency-id or iso-code of the currency. -* **Examples:** - * Create a new Price in the default currency. - - ```twig - {% set price = services.cart.price.create({ - 'default': { 'gross': 19.99, 'net': 19.99} - }) %} - ``` - _________ - ## [`Shopware\Core\Content\Product\Hook\Pricing\PriceCollectionFacade`](https://github.com/shopware/shopware/blob/trunk/src/Core/Content/Product/Hook/Pricing/PriceCollectionFacade.php) {#pricecollectionfacade} The PriceCollectionFacade is a wrapper around the calculated price collection of a product. It allows to manipulate the quantity prices by resetting or changing the price collection. -### reset() - -* The `reset()` functions allows to reset the complete price collection. ### change() * The `change()` function allows a complete overwrite of the product quantity prices + * **Arguments:** - * *`array`* **changes**: + * *`array`* **changes**: * **Examples:** * Overwrite the product prices with a new quantity price graduation @@ -208,26 +199,31 @@ prices by resetting or changing the price collection. { to: null, price: services.price.create({ 'default': { 'gross': 5, 'net': 5} }) }, ]) %} ``` - ### count() * The `count()` function returns the number of prices which are stored inside this collection. + * **Returns** `int` Returns the number of prices which are stored inside this collection +### reset() -_________ +* The `reset()` functions allows to reset the complete price collection. + +_________ ## [`Shopware\Core\Content\Product\Hook\Pricing\ProductProxy`](https://github.com/shopware/shopware/blob/trunk/src/Core/Content/Product/Hook/Pricing/ProductProxy.php) {#productproxy} The `ProductProxy` is a wrapper for the `SalesChannelProductEntity`. It provides access to all properties of the product, but also wraps some data into helper facade classes like `PriceFacade` or `PriceCollectionFacade`. + ### __get() * The `__get()` function allows access to all properties of the [SalesChannelProductEntity](https://github.com/shopware/shopware/blob/trunk/src/Core/Content/Product/SalesChannel/SalesChannelProductEntity.php) + * **Returns** `mixed` | `null` Returns the value of the property. The value is `mixed` due to the fact that all properties are accessed via `__get()` @@ -241,32 +237,31 @@ but also wraps some data into helper facade classes like `PriceFacade` or `Price { to: null, price: services.price.create({ 'default': { 'gross': 5, 'net': 5} }) }, ]) %} ``` - ### calculatedCheapestPrice() * The `calculatedCheapestPrice` property returns the cheapest price of the product. The price object will be wrapped into a `PriceFacade` object which allows to manipulate the price. + * **Returns** [`Shopware\Core\Checkout\Cart\Facade\PriceFacade`](./cart-manipulation-script-services-reference#pricefacade) | `null` Returns a `PriceFacade` if the product has a calculated cheapest price, otherwise `null` - ### calculatedPrice() * The `calculatedPrice` property returns the price of the product. The price object will be wrapped into a `PriceFacade` object which allows to manipulate the price. + * **Returns** [`Shopware\Core\Checkout\Cart\Facade\PriceFacade`](./cart-manipulation-script-services-reference#pricefacade) | `null` Returns a `PriceFacade` if the product has a price, otherwise `null` - ### calculatedPrices() * The `calculatedPrices` property returns the price of the product. The price object will be wrapped into a `PriceCollectionFacade` object which allows to manipulate the collection. + * **Returns** [`Shopware\Core\Content\Product\Hook\Pricing\PriceCollectionFacade`](./product-script-services-reference#pricecollectionfacade) | `null` Returns a `PriceCollectionFacade` if the product has graduated prices, otherwise `null` - _________ diff --git a/resources/references/app-reference/script-reference/script-hooks-reference.md b/resources/references/app-reference/script-reference/script-hooks-reference.md index 11ed37d7b1..0a1c04ce71 100644 --- a/resources/references/app-reference/script-reference/script-hooks-reference.md +++ b/resources/references/app-reference/script-reference/script-hooks-reference.md @@ -20,8 +20,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.5.0.0 | | **Class** | `Shopware\Core\Checkout\Payment\Hook\PaymentMethodRouteHook` | | **Description** | Triggered when PaymentMethodRoute is requested
| -| **Available Data** | collection: [`Shopware\Core\Checkout\Payment\PaymentMethodCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Payment/PaymentMethodCollection.php)
onlyAvailable: `bool`
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
| +| **Available Data** | collection: [`Shopware\Core\Checkout\Payment\PaymentMethodCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Payment/PaymentMethodCollection.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
onlyAvailable: `bool`
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### shipping-method-route-request @@ -32,8 +32,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.5.0.0 | | **Class** | `Shopware\Core\Checkout\Shipping\Hook\ShippingMethodRouteHook` | | **Description** | Triggered when ShippingMethodRoute is requested
| -| **Available Data** | collection: [`Shopware\Core\Checkout\Shipping\ShippingMethodCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Shipping/ShippingMethodCollection.php)
onlyAvailable: `bool`
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
| +| **Available Data** | collection: [`Shopware\Core\Checkout\Shipping\ShippingMethodCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Shipping/ShippingMethodCollection.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
onlyAvailable: `bool`
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### product-reviews-widget-loaded @@ -44,8 +44,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.6.9.0 | | **Class** | `Shopware\Core\Content\Product\SalesChannel\Review\ProductReviewsWidgetLoadedHook` | | **Description** | Triggered when the ProductReviewsWidget is loaded
| -| **Available Data** | reviews: [`Shopware\Core\Content\Product\SalesChannel\Review\ProductReviewResult`](https://github.com/shopware/shopware/blob/trunk/src/Core/Content/Product/SalesChannel/Review/ProductReviewResult.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
reviews: [`Shopware\Core\Content\Product\SalesChannel\Review\ProductReviewResult`](https://github.com/shopware/shopware/blob/trunk/src/Core/Content/Product/SalesChannel/Review/ProductReviewResult.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### customer-group-registration-page-loaded @@ -56,8 +56,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.4.8.0 | | **Class** | `Shopware\Storefront\Page\Account\CustomerGroupRegistration\CustomerGroupRegistrationPageLoadedHook` | | **Description** | Triggered when the CustomerGroupRegistrationPage is loaded
| -| **Available Data** | page: [`Shopware\Storefront\Page\Account\CustomerGroupRegistration\CustomerGroupRegistrationPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Account/CustomerGroupRegistration/CustomerGroupRegistrationPage.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
page: [`Shopware\Storefront\Page\Account\CustomerGroupRegistration\CustomerGroupRegistrationPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Account/CustomerGroupRegistration/CustomerGroupRegistrationPage.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### account-guest-login-page-loaded @@ -68,8 +68,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.4.8.0 | | **Class** | `Shopware\Storefront\Page\Account\Login\AccountGuestLoginPageLoadedHook` | | **Description** | Triggered when the AccountGuestLoginPage is loaded
| -| **Available Data** | page: [`Shopware\Storefront\Page\Account\Login\AccountLoginPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Account/Login/AccountLoginPage.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
page: [`Shopware\Storefront\Page\Account\Login\AccountLoginPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Account/Login/AccountLoginPage.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### account-login-page-loaded @@ -80,8 +80,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.4.8.0 | | **Class** | `Shopware\Storefront\Page\Account\Login\AccountLoginPageLoadedHook` | | **Description** | Triggered when the AccountLoginPage is loaded
| -| **Available Data** | page: [`Shopware\Storefront\Page\Account\Login\AccountLoginPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Account/Login/AccountLoginPage.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
page: [`Shopware\Storefront\Page\Account\Login\AccountLoginPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Account/Login/AccountLoginPage.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### account-edit-order-page-loaded @@ -92,8 +92,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.4.8.0 | | **Class** | `Shopware\Storefront\Page\Account\Order\AccountEditOrderPageLoadedHook` | | **Description** | Triggered when the AccountEditOrderPage is loaded
| -| **Available Data** | page: [`Shopware\Storefront\Page\Account\Order\AccountEditOrderPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Account/Order/AccountEditOrderPage.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
page: [`Shopware\Storefront\Page\Account\Order\AccountEditOrderPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Account/Order/AccountEditOrderPage.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### account-order-detail-page-loaded @@ -104,8 +104,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.4.8.0 | | **Class** | `Shopware\Storefront\Page\Account\Order\AccountOrderDetailPageLoadedHook` | | **Description** | Triggered when the AccountOrderDetailPage is loaded
| -| **Available Data** | page: [`Shopware\Storefront\Page\Account\Order\AccountOrderDetailPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Account/Order/AccountOrderDetailPage.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
page: [`Shopware\Storefront\Page\Account\Order\AccountOrderDetailPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Account/Order/AccountOrderDetailPage.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### account-order-page-loaded @@ -116,8 +116,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.4.8.0 | | **Class** | `Shopware\Storefront\Page\Account\Order\AccountOrderPageLoadedHook` | | **Description** | Triggered when the AccountOrderPage is loaded
| -| **Available Data** | page: [`Shopware\Storefront\Page\Account\Order\AccountOrderPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Account/Order/AccountOrderPage.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
page: [`Shopware\Storefront\Page\Account\Order\AccountOrderPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Account/Order/AccountOrderPage.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### account-overview-page-loaded @@ -128,8 +128,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.4.8.0 | | **Class** | `Shopware\Storefront\Page\Account\Overview\AccountOverviewPageLoadedHook` | | **Description** | Triggered when the AccountOverviewPage is loaded
| -| **Available Data** | page: [`Shopware\Storefront\Page\Account\Overview\AccountOverviewPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Account/Overview/AccountOverviewPage.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
page: [`Shopware\Storefront\Page\Account\Overview\AccountOverviewPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Account/Overview/AccountOverviewPage.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### account-profile-page-loaded @@ -140,8 +140,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.4.8.0 | | **Class** | `Shopware\Storefront\Page\Account\Profile\AccountProfilePageLoadedHook` | | **Description** | Triggered when the AccountProfilePage is loaded
| -| **Available Data** | page: [`Shopware\Storefront\Page\Account\Profile\AccountProfilePage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Account/Profile/AccountProfilePage.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
page: [`Shopware\Storefront\Page\Account\Profile\AccountProfilePage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Account/Profile/AccountProfilePage.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### account-recover-password-page-loaded @@ -152,8 +152,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.4.13.0 | | **Class** | `Shopware\Storefront\Page\Account\RecoverPassword\AccountRecoverPasswordPageLoadedHook` | | **Description** | Triggered when the AccountRecoverPasswordPage is loaded
| -| **Available Data** | page: [`Shopware\Storefront\Page\Account\RecoverPassword\AccountRecoverPasswordPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Account/RecoverPassword/AccountRecoverPasswordPage.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
page: [`Shopware\Storefront\Page\Account\RecoverPassword\AccountRecoverPasswordPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Account/RecoverPassword/AccountRecoverPasswordPage.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### account-register-page-loaded @@ -164,8 +164,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.4.8.0 | | **Class** | `Shopware\Storefront\Page\Account\Register\AccountRegisterPageLoadedHook` | | **Description** | Triggered when the AccountLoginPage is loaded
| -| **Available Data** | page: [`Shopware\Storefront\Page\Account\Login\AccountLoginPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Account/Login/AccountLoginPage.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
page: [`Shopware\Storefront\Page\Account\Login\AccountLoginPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Account/Login/AccountLoginPage.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### address-detail-page-loaded @@ -176,8 +176,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.4.8.0 | | **Class** | `Shopware\Storefront\Page\Address\Detail\AddressDetailPageLoadedHook` | | **Description** | Triggered when the AddressDetailPage is loaded
| -| **Available Data** | page: [`Shopware\Storefront\Page\Address\Detail\AddressDetailPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Address/Detail/AddressDetailPage.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
page: [`Shopware\Storefront\Page\Address\Detail\AddressDetailPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Address/Detail/AddressDetailPage.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### address-book-widget-loaded @@ -188,8 +188,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.4.8.0 | | **Class** | `Shopware\Storefront\Page\Address\Listing\AddressBookWidgetLoadedHook` | | **Description** | Triggered when the AddressBookWidget is loaded
| -| **Available Data** | page: [`Shopware\Storefront\Page\Address\Listing\AddressListingPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Address/Listing/AddressListingPage.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
page: [`Shopware\Storefront\Page\Address\Listing\AddressListingPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Address/Listing/AddressListingPage.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### address-listing-page-loaded @@ -200,8 +200,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.4.8.0 | | **Class** | `Shopware\Storefront\Page\Address\Listing\AddressListingPageLoadedHook` | | **Description** | Triggered when the AddressListingPage is loaded
| -| **Available Data** | page: [`Shopware\Storefront\Page\Address\Listing\AddressListingPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Address/Listing/AddressListingPage.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
page: [`Shopware\Storefront\Page\Address\Listing\AddressListingPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Address/Listing/AddressListingPage.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### checkout-cart-page-loaded @@ -212,8 +212,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.4.8.0 | | **Class** | `Shopware\Storefront\Page\Checkout\Cart\CheckoutCartPageLoadedHook` | | **Description** | Triggered when the CheckoutCartPage is loaded
| -| **Available Data** | page: [`Shopware\Storefront\Page\Checkout\Cart\CheckoutCartPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Checkout/Cart/CheckoutCartPage.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
page: [`Shopware\Storefront\Page\Checkout\Cart\CheckoutCartPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Checkout/Cart/CheckoutCartPage.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### checkout-confirm-page-loaded @@ -224,8 +224,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.4.8.0 | | **Class** | `Shopware\Storefront\Page\Checkout\Confirm\CheckoutConfirmPageLoadedHook` | | **Description** | Triggered when the CheckoutConfirmPage is loaded
| -| **Available Data** | page: [`Shopware\Storefront\Page\Checkout\Confirm\CheckoutConfirmPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Checkout/Confirm/CheckoutConfirmPage.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
page: [`Shopware\Storefront\Page\Checkout\Confirm\CheckoutConfirmPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Checkout/Confirm/CheckoutConfirmPage.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### checkout-finish-page-loaded @@ -236,8 +236,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.4.8.0 | | **Class** | `Shopware\Storefront\Page\Checkout\Finish\CheckoutFinishPageLoadedHook` | | **Description** | Triggered when the CheckoutFinishPage is loaded
| -| **Available Data** | page: [`Shopware\Storefront\Page\Checkout\Finish\CheckoutFinishPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Checkout/Finish/CheckoutFinishPage.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
page: [`Shopware\Storefront\Page\Checkout\Finish\CheckoutFinishPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Checkout/Finish/CheckoutFinishPage.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### checkout-info-widget-loaded @@ -248,8 +248,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.4.8.0 | | **Class** | `Shopware\Storefront\Page\Checkout\Offcanvas\CheckoutInfoWidgetLoadedHook` | | **Description** | Triggered when the CheckoutInfoWidget is loaded
| -| **Available Data** | page: [`Shopware\Storefront\Page\Checkout\Offcanvas\OffcanvasCartPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Checkout/Offcanvas/OffcanvasCartPage.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
page: [`Shopware\Storefront\Page\Checkout\Offcanvas\OffcanvasCartPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Checkout/Offcanvas/OffcanvasCartPage.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### checkout-offcanvas-widget-loaded @@ -260,8 +260,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.4.8.0 | | **Class** | `Shopware\Storefront\Page\Checkout\Offcanvas\CheckoutOffcanvasWidgetLoadedHook` | | **Description** | Triggered when the CheckoutOffcanvasWidget is loaded
| -| **Available Data** | page: [`Shopware\Storefront\Page\Checkout\Offcanvas\OffcanvasCartPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Checkout/Offcanvas/OffcanvasCartPage.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
page: [`Shopware\Storefront\Page\Checkout\Offcanvas\OffcanvasCartPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Checkout/Offcanvas/OffcanvasCartPage.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### checkout-register-page-loaded @@ -272,8 +272,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.4.8.0 | | **Class** | `Shopware\Storefront\Page\Checkout\Register\CheckoutRegisterPageLoadedHook` | | **Description** | Triggered when the CheckoutRegisterPage is loaded
| -| **Available Data** | page: [`Shopware\Storefront\Page\Checkout\Register\CheckoutRegisterPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Checkout/Register/CheckoutRegisterPage.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
page: [`Shopware\Storefront\Page\Checkout\Register\CheckoutRegisterPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Checkout/Register/CheckoutRegisterPage.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### cms-page-loaded @@ -284,8 +284,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.4.8.0 | | **Class** | `Shopware\Storefront\Page\Cms\CmsPageLoadedHook` | | **Description** | Triggered when a CmsPage is loaded
| -| **Available Data** | page: [`Shopware\Core\Content\Cms\CmsPageEntity`](https://github.com/shopware/shopware/blob/trunk/src/Core/Content/Cms/CmsPageEntity.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
page: [`Shopware\Core\Content\Cms\CmsPageEntity`](https://github.com/shopware/shopware/blob/trunk/src/Core/Content/Cms/CmsPageEntity.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### landing-page-loaded @@ -296,8 +296,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.4.8.0 | | **Class** | `Shopware\Storefront\Page\LandingPage\LandingPageLoadedHook` | | **Description** | Triggered when the LandingPage is loaded
| -| **Available Data** | page: [`Shopware\Storefront\Page\LandingPage\LandingPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/LandingPage/LandingPage.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
page: [`Shopware\Storefront\Page\LandingPage\LandingPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/LandingPage/LandingPage.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### maintenance-page-loaded @@ -308,8 +308,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.4.8.0 | | **Class** | `Shopware\Storefront\Page\Maintenance\MaintenancePageLoadedHook` | | **Description** | Triggered when the MaintenancePage is loaded
| -| **Available Data** | page: [`Shopware\Storefront\Page\Maintenance\MaintenancePage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Maintenance/MaintenancePage.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
page: [`Shopware\Storefront\Page\Maintenance\MaintenancePage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Maintenance/MaintenancePage.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### navigation-page-loaded @@ -320,8 +320,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.4.8.0 | | **Class** | `Shopware\Storefront\Page\Navigation\NavigationPageLoadedHook` | | **Description** | Triggered when the NavigationPage is loaded
| -| **Available Data** | page: [`Shopware\Storefront\Page\Navigation\NavigationPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Navigation/NavigationPage.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
page: [`Shopware\Storefront\Page\Navigation\NavigationPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Navigation/NavigationPage.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### product-page-loaded @@ -332,8 +332,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.4.8.0 | | **Class** | `Shopware\Storefront\Page\Product\ProductPageLoadedHook` | | **Description** | Triggered when the ProductPage is loaded
| -| **Available Data** | page: [`Shopware\Storefront\Page\Product\ProductPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Product/ProductPage.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
page: [`Shopware\Storefront\Page\Product\ProductPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Product/ProductPage.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### product-quick-view-widget-loaded @@ -344,8 +344,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.4.8.0 | | **Class** | `Shopware\Storefront\Page\Product\QuickView\ProductQuickViewWidgetLoadedHook` | | **Description** | Triggered when the ProductQuickViewWidget is loaded
| -| **Available Data** | page: [`Shopware\Storefront\Page\Product\QuickView\MinimalQuickViewPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Product/QuickView/MinimalQuickViewPage.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
page: [`Shopware\Storefront\Page\Product\QuickView\MinimalQuickViewPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Product/QuickView/MinimalQuickViewPage.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### search-page-loaded @@ -356,8 +356,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.4.8.0 | | **Class** | `Shopware\Storefront\Page\Search\SearchPageLoadedHook` | | **Description** | Triggered when the SearchPage is loaded
| -| **Available Data** | page: [`Shopware\Storefront\Page\Search\SearchPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Search/SearchPage.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
page: [`Shopware\Storefront\Page\Search\SearchPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Search/SearchPage.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### search-widget-loaded @@ -368,8 +368,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.4.8.0 | | **Class** | `Shopware\Storefront\Page\Search\SearchWidgetLoadedHook` | | **Description** | Triggered when the SearchWidget is loaded
| -| **Available Data** | page: [`Shopware\Storefront\Page\Search\SearchPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Search/SearchPage.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
page: [`Shopware\Storefront\Page\Search\SearchPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Search/SearchPage.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### sitemap-page-loaded @@ -380,8 +380,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.4.8.0 | | **Class** | `Shopware\Storefront\Page\Sitemap\SitemapPageLoadedHook` | | **Description** | Triggered when the SitemapPage is loaded
| -| **Available Data** | page: [`Shopware\Storefront\Page\Sitemap\SitemapPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Sitemap/SitemapPage.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
page: [`Shopware\Storefront\Page\Sitemap\SitemapPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Sitemap/SitemapPage.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### suggest-page-loaded @@ -392,8 +392,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.4.8.0 | | **Class** | `Shopware\Storefront\Page\Suggest\SuggestPageLoadedHook` | | **Description** | Triggered when the SuggestPage is loaded
| -| **Available Data** | page: [`Shopware\Storefront\Page\Suggest\SuggestPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Suggest/SuggestPage.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
page: [`Shopware\Storefront\Page\Suggest\SuggestPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Suggest/SuggestPage.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### guest-wishlist-page-loaded @@ -404,8 +404,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.4.8.0 | | **Class** | `Shopware\Storefront\Page\Wishlist\GuestWishlistPageLoadedHook` | | **Description** | Triggered when the GuestWishlistPage is loaded
| -| **Available Data** | page: [`Shopware\Storefront\Page\Wishlist\GuestWishlistPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Wishlist/GuestWishlistPage.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
page: [`Shopware\Storefront\Page\Wishlist\GuestWishlistPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Wishlist/GuestWishlistPage.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### wishlist-page-loaded @@ -416,8 +416,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.4.8.0 | | **Class** | `Shopware\Storefront\Page\Wishlist\WishlistPageLoadedHook` | | **Description** | Triggered when the WishlistPage is loaded
| -| **Available Data** | page: [`Shopware\Storefront\Page\Wishlist\WishlistPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Wishlist/WishlistPage.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
page: [`Shopware\Storefront\Page\Wishlist\WishlistPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Wishlist/WishlistPage.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### wishlist-widget-loaded @@ -428,8 +428,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.4.8.0 | | **Class** | `Shopware\Storefront\Page\Wishlist\WishlistWidgetLoadedHook` | | **Description** | Triggered when the WishlistWidget is loaded
| -| **Available Data** | page: [`Shopware\Storefront\Page\Wishlist\WishlistPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Wishlist/WishlistPage.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
page: [`Shopware\Storefront\Page\Wishlist\WishlistPage`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Wishlist/WishlistPage.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### country-state-data-pagelet-loaded @@ -440,8 +440,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.4.8.0 | | **Class** | `Shopware\Storefront\Pagelet\Country\CountryStateDataPageletLoadedHook` | | **Description** | Triggered when the CountryStateDataPagelet is loaded
| -| **Available Data** | pagelet: [`Shopware\Storefront\Pagelet\Country\CountryStateDataPagelet`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Pagelet/Country/CountryStateDataPagelet.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
pagelet: [`Shopware\Storefront\Pagelet\Country\CountryStateDataPagelet`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Pagelet/Country/CountryStateDataPagelet.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### footer-pagelet-loaded @@ -452,8 +452,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.7.0.0 | | **Class** | `Shopware\Storefront\Pagelet\Footer\FooterPageletLoadedHook` | | **Description** | Triggered when the FooterPagelet is loaded
| -| **Available Data** | page: [`Shopware\Storefront\Pagelet\Footer\FooterPagelet`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Pagelet/Footer/FooterPagelet.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
page: [`Shopware\Storefront\Pagelet\Footer\FooterPagelet`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Pagelet/Footer/FooterPagelet.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### header-pagelet-loaded @@ -464,8 +464,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.7.0.0 | | **Class** | `Shopware\Storefront\Pagelet\Header\HeaderPageletLoadedHook` | | **Description** | Triggered when the HeaderPagelet is loaded
| -| **Available Data** | page: [`Shopware\Storefront\Pagelet\Header\HeaderPagelet`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Pagelet/Header/HeaderPagelet.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
page: [`Shopware\Storefront\Pagelet\Header\HeaderPagelet`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Pagelet/Header/HeaderPagelet.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### menu-offcanvas-pagelet-loaded @@ -476,8 +476,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.4.8.0 | | **Class** | `Shopware\Storefront\Pagelet\Menu\Offcanvas\MenuOffcanvasPageletLoadedHook` | | **Description** | Triggered when the MenuOffcanvasPagelet is loaded
| -| **Available Data** | page: [`Shopware\Storefront\Pagelet\Menu\Offcanvas\MenuOffcanvasPagelet`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Pagelet/Menu/Offcanvas/MenuOffcanvasPagelet.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
page: [`Shopware\Storefront\Pagelet\Menu\Offcanvas\MenuOffcanvasPagelet`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Pagelet/Menu/Offcanvas/MenuOffcanvasPagelet.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### guest-wishlist-pagelet-loaded @@ -488,8 +488,8 @@ All available Hooks that can be used to load additional data. | **Since** | 6.4.8.0 | | **Class** | `Shopware\Storefront\Pagelet\Wishlist\GuestWishlistPageletLoadedHook` | | **Description** | Triggered when the GuestWishlistPagelet is loaded
| -| **Available Data** | page: [`Shopware\Storefront\Pagelet\Wishlist\GuestWishlistPagelet`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Pagelet/Wishlist/GuestWishlistPagelet.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
page: [`Shopware\Storefront\Pagelet\Wishlist\GuestWishlistPagelet`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Pagelet/Wishlist/GuestWishlistPagelet.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ## Cart Manipulation @@ -504,8 +504,8 @@ All available Hooks that can be used to manipulate the cart. | **Since** | 6.4.8.0 | | **Class** | `Shopware\Core\Checkout\Cart\Hook\CartHook` | | **Description** | Triggered during the cart calculation process.
| -| **Available Data** | salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
cart: [`Shopware\Core\Checkout\Cart\Cart`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Cart/Cart.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
| -| **Available Services** | [cart](./cart-manipulation-script-services-reference#CartFacade)
[price](./cart-manipulation-script-services-reference#PriceFactory)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
| +| **Available Data** | cart: [`Shopware\Core\Checkout\Cart\Cart`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Cart/Cart.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [cart](./cart-manipulation-script-services-reference#CartFacade)
[price](./cart-manipulation-script-services-reference#PriceFactory)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ## Custom API endpoint @@ -520,8 +520,8 @@ All available hooks within the Store-API and API | **Since** | 6.4.9.0 | | **Class** | `Shopware\Core\Framework\Adapter\Cache\Script\CacheInvalidationHook` | | **Description** | Triggered whenever an entity is written.
| -| **Available Data** | event: [`Shopware\Core\Framework\Adapter\Cache\Script\Facade\WrittenEventScriptFacade`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Adapter/Cache/Script/Facade/WrittenEventScriptFacade.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
| -| **Available Services** | [cache](./custom-endpoint-script-services-reference#CacheInvalidatorFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
event: [`Shopware\Core\Framework\Adapter\Cache\Script\Facade\WrittenEventScriptFacade`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Adapter/Cache/Script/Facade/WrittenEventScriptFacade.php)
| +| **Available Services** | [cache](./custom-endpoint-script-services-reference#CacheInvalidatorFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### api-{hook} @@ -532,21 +532,21 @@ All available hooks within the Store-API and API | **Since** | 6.4.9.0 | | **Class** | `Shopware\Core\Framework\Script\Api\ApiHook` | | **Description** | Triggered when the api endpoint /api/script/{hook} is called
| -| **Available Data** | name: `string`
request: `array`
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
scriptResponse: [`Shopware\Core\Framework\Script\Api\ScriptResponse`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Script/Api/ScriptResponse.php)
isPropagationStopped: `bool`
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[writer](./custom-endpoint-script-services-reference#RepositoryWriterFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[response](./custom-endpoint-script-services-reference#ScriptResponseFactoryFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
isPropagationStopped: `bool`
name: `string`
request: `array`
scriptResponse: [`Shopware\Core\Framework\Script\Api\ScriptResponse`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Script/Api/ScriptResponse.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[writer](./custom-endpoint-script-services-reference#RepositoryWriterFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[response](./custom-endpoint-script-services-reference#ScriptResponseFactoryFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `true` | -#### response +### response -| | | -|:-----------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **Name** | response | -| **Since** | 6.6.10.4 | -| **Class** | `Shopware\Core\Framework\Script\Api\ResponseHook` | -| **Description** | Triggered on every response
| -| **Available Data** | routeName: `string`
routeScopes: `array`
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
| -| **Available Services** | | -| **Stoppable** | `false` | +| | | +|:-----------------------|:----------------------------------------| +| **Name** | response | +| **Since** | 6.6.10.0 | +| **Class** | `Shopware\Core\Framework\Script\Api\ResponseHook` | +| **Description** | Triggered on every response
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
response: `Symfony\Component\HttpFoundation\Response`
routeName: `string`
routeScopes: `array`
| +| **Available Services** | [acl](./miscellaneous-script-services-reference#AclFacade)
| +| **Stoppable** | `false` | ### store-api-{hook} @@ -563,8 +563,8 @@ Triggered when the api endpoint /store-api/script/{hook} is called. Used to exec | **Optional** | `true` | | **Class** | `Shopware\Core\Framework\Script\Api\StoreApiCacheKeyHook` | | **Description** | Triggered when the api endpoint /store-api/script/{hook} is called. Used to provide a cache-key based on the request.
Needs to be implemented when your store-api route should be cached. | -| **Available Data** | cacheKey: `string`
name: `string`
request: `array`
query: `array`
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
isPropagationStopped: `bool`
| -| **Available Services** | | +| **Available Data** | cacheKey: `string`
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
isPropagationStopped: `bool`
name: `string`
query: `array`
request: `array`
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `true` | #### Function: `response` @@ -576,8 +576,8 @@ Triggered when the api endpoint /store-api/script/{hook} is called. Used to exec | **Optional** | `false` | | **Class** | `Shopware\Core\Framework\Script\Api\StoreApiResponseHook` | | **Description** | Triggered when the api endpoint /store-api/script/{hook} is called. Used to provide the HTTP-Response.
This function is only called when no response for the provided cache key is cached, or no `cache_key` function implemented. | -| **Available Data** | name: `string`
request: `array`
query: `array`
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
scriptResponse: [`Shopware\Core\Framework\Script\Api\ScriptResponse`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Script/Api/ScriptResponse.php)
isPropagationStopped: `bool`
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[writer](./custom-endpoint-script-services-reference#RepositoryWriterFacade)
[response](./custom-endpoint-script-services-reference#ScriptResponseFactoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
isPropagationStopped: `bool`
name: `string`
query: `array`
request: `array`
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
scriptResponse: [`Shopware\Core\Framework\Script\Api\ScriptResponse`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Script/Api/ScriptResponse.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[writer](./custom-endpoint-script-services-reference#RepositoryWriterFacade)
[response](./custom-endpoint-script-services-reference#ScriptResponseFactoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `true` | ### storefront-{hook} @@ -588,8 +588,8 @@ Triggered when the api endpoint /store-api/script/{hook} is called. Used to exec | **Since** | 6.4.9.0 | | **Class** | `Shopware\Storefront\Framework\Script\Api\StorefrontHook` | | **Description** | Triggered when the storefront endpoint /storefront/script/{hook} is called
| -| **Available Data** | script: `string`
request: `array`
query: `array`
page: [`Shopware\Storefront\Page\Page`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Page.php)
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
scriptResponse: [`Shopware\Core\Framework\Script\Api\ScriptResponse`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Script/Api/ScriptResponse.php)
isPropagationStopped: `bool`
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[writer](./custom-endpoint-script-services-reference#RepositoryWriterFacade)
[response](./custom-endpoint-script-services-reference#ScriptResponseFactoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
isPropagationStopped: `bool`
page: [`Shopware\Storefront\Page\Page`](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Page/Page.php)
query: `array`
request: `array`
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
script: `string`
scriptResponse: [`Shopware\Core\Framework\Script\Api\ScriptResponse`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Script/Api/ScriptResponse.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[writer](./custom-endpoint-script-services-reference#RepositoryWriterFacade)
[response](./custom-endpoint-script-services-reference#ScriptResponseFactoryFacade)
[request](./miscellaneous-script-services-reference#RequestFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `true` | ## App Lifecycle @@ -604,8 +604,8 @@ All available hooks that can be used to execute scripts during your app's lifecy | **Since** | 6.4.9.0 | | **Class** | `Shopware\Core\Framework\App\Event\Hooks\AppActivatedHook` | | **Description** | Triggered when your app is activated.
| -| **Available Data** | event: [`Shopware\Core\Framework\App\Event\AppActivatedEvent`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/App/Event/AppActivatedEvent.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[writer](./custom-endpoint-script-services-reference#RepositoryWriterFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
event: [`Shopware\Core\Framework\App\Event\AppActivatedEvent`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/App/Event/AppActivatedEvent.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[writer](./custom-endpoint-script-services-reference#RepositoryWriterFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### app-deactivated @@ -616,8 +616,8 @@ All available hooks that can be used to execute scripts during your app's lifecy | **Since** | 6.4.9.0 | | **Class** | `Shopware\Core\Framework\App\Event\Hooks\AppDeactivatedHook` | | **Description** | Triggered when your app is deactivated.
| -| **Available Data** | event: [`Shopware\Core\Framework\App\Event\AppDeactivatedEvent`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/App/Event/AppDeactivatedEvent.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[writer](./custom-endpoint-script-services-reference#RepositoryWriterFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
event: [`Shopware\Core\Framework\App\Event\AppDeactivatedEvent`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/App/Event/AppDeactivatedEvent.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[writer](./custom-endpoint-script-services-reference#RepositoryWriterFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### app-deleted @@ -628,8 +628,8 @@ All available hooks that can be used to execute scripts during your app's lifecy | **Since** | 6.4.9.0 | | **Class** | `Shopware\Core\Framework\App\Event\Hooks\AppDeletedHook` | | **Description** | Triggered when your app is deleted.
| -| **Available Data** | event: [`Shopware\Core\Framework\App\Event\AppDeletedEvent`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/App/Event/AppDeletedEvent.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[writer](./custom-endpoint-script-services-reference#RepositoryWriterFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
event: [`Shopware\Core\Framework\App\Event\AppDeletedEvent`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/App/Event/AppDeletedEvent.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[writer](./custom-endpoint-script-services-reference#RepositoryWriterFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### app-installed @@ -640,8 +640,8 @@ All available hooks that can be used to execute scripts during your app's lifecy | **Since** | 6.4.9.0 | | **Class** | `Shopware\Core\Framework\App\Event\Hooks\AppInstalledHook` | | **Description** | Triggered when your app is installed.
| -| **Available Data** | event: [`Shopware\Core\Framework\App\Event\AppInstalledEvent`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/App/Event/AppInstalledEvent.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[writer](./custom-endpoint-script-services-reference#RepositoryWriterFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
event: [`Shopware\Core\Framework\App\Event\AppInstalledEvent`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/App/Event/AppInstalledEvent.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[writer](./custom-endpoint-script-services-reference#RepositoryWriterFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ### app-updated @@ -652,8 +652,8 @@ All available hooks that can be used to execute scripts during your app's lifecy | **Since** | 6.4.9.0 | | **Class** | `Shopware\Core\Framework\App\Event\Hooks\AppUpdatedHook` | | **Description** | Triggered when your app is updated.
| -| **Available Data** | event: [`Shopware\Core\Framework\App\Event\AppUpdatedEvent`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/App/Event/AppUpdatedEvent.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[writer](./custom-endpoint-script-services-reference#RepositoryWriterFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
event: [`Shopware\Core\Framework\App\Event\AppUpdatedEvent`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/App/Event/AppUpdatedEvent.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[writer](./custom-endpoint-script-services-reference#RepositoryWriterFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | ## Product @@ -668,6 +668,7 @@ All available hooks that can be used to manipulate products. | **Since** | 6.5.1.0 | | **Class** | `Shopware\Core\Content\Product\Hook\Pricing\ProductPricingHook` | | **Description** | Triggered when product prices are calculated for the store
| -| **Available Data** | products: `array`
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
| -| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[price](./cart-manipulation-script-services-reference#PriceFactory)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
| +| **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
products: `array`
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| +| **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[price](./cart-manipulation-script-services-reference#PriceFactory)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | + diff --git a/resources/references/app-reference/script-reference/trigger-events-reference.md b/resources/references/app-reference/script-reference/trigger-events-reference.md new file mode 100644 index 0000000000..3538e5f5c3 --- /dev/null +++ b/resources/references/app-reference/script-reference/trigger-events-reference.md @@ -0,0 +1,91 @@ + + +# Trigger Events Reference + +| Event | Description | +| :--- | :--- | +|`checkout.customer.before.login` | Triggers as soon as a customer logs in | +|`checkout.customer.deleted` | Triggers if a customer gets deleted | +|`checkout.customer.double_opt_in_guest_order` | Triggers as soon as double opt-in is accepted in a guest order | +|`checkout.customer.double_opt_in_registration` | Triggers when a customer commits to his registration via double opt-in | +|`checkout.customer.guest_register` | Triggers when a new guest customer was registered | +|`checkout.customer.login` | Triggers as soon as a customer logs in | +|`checkout.customer.logout` | Triggers when a customer logs out | +|`checkout.customer.register` | Triggers when a new customer was registered | +|`checkout.order.payment_method.changed` | Triggers when a user changed payment method during checkout process | +|`checkout.order.placed` | Triggers when an order is placed | +|`contact_form.send` | Triggers when a contact form is send | +|`customer.group.registration.accepted` | Triggers when admin accepted a user who register to join a customer group | +|`customer.group.registration.declined` | Triggers when admin declined a user who register to join a customer group | +|`customer.password.changed` | Triggers when a customer changes the password | +|`customer.recovery.request` | Triggers when a customer recovers his password | +|`mail.after.create.message` | Triggers when a mail message/ content is created | +|`mail.before.send` | Triggers before a mail is send | +|`mail.sent` | Triggers when a mail is send from Shopware | +|`newsletter.confirm` | Triggers when newsletter was confirmed by a user | +|`newsletter.register` | Triggers when user registered to subscribe to a sales channel newsletter | +|`newsletter.unsubscribe` | Triggers when user unsubscribe from a sales channel newsletter | +|`product_export.log` | Triggers when product export is executed | +|`review_form.send` | Triggers when a product review form is submitted by a customer | +|`revocation_request.sent` | Shopware\Core\Content\RevocationRequest\Event\RevocationRequestEvent | +|`state_enter.order.state.cancelled` | Triggers when an order enters status "Cancelled" | +|`state_enter.order.state.completed` | Triggers when an order enters status "Completed" | +|`state_enter.order.state.in_progress` | Triggers when an order enters status "In progress" | +|`state_enter.order.state.open` | Triggers when an order enters status "Open" | +|`state_enter.order_delivery.state.cancelled` | Triggers when an order delivery enters status "Cancelled" | +|`state_enter.order_delivery.state.open` | Triggers when an order delivery enters status "Open" | +|`state_enter.order_delivery.state.returned` | Triggers when an order delivery enters status "Returned" | +|`state_enter.order_delivery.state.returned_partially` | Triggers when an order delivery enters status "Return partially" | +|`state_enter.order_delivery.state.shipped` | Triggers when an order delivery enters status "Shipped" | +|`state_enter.order_delivery.state.shipped_partially` | Triggers when an order delivery enters status "Shipped partially" | +|`state_enter.order_transaction.state.authorized` | Triggers when an order payment enters status "Authorized" | +|`state_enter.order_transaction.state.cancelled` | Triggers when an order payment enters status "Cancelled" | +|`state_enter.order_transaction.state.chargeback` | Triggers when an order payment enters status "Chargeback" | +|`state_enter.order_transaction.state.failed` | Triggers when an order payment enters status "Failed" | +|`state_enter.order_transaction.state.in_progress` | Triggers when an order payment enters status "In progress" | +|`state_enter.order_transaction.state.open` | Triggers when an order payment enters status "Open" | +|`state_enter.order_transaction.state.paid` | Triggers when an order payment enters status "Paid" | +|`state_enter.order_transaction.state.paid_partially` | Triggers when an order payment enters status "Paid partially" | +|`state_enter.order_transaction.state.refunded` | Triggers when an order payment enters status "Refunded" | +|`state_enter.order_transaction.state.refunded_partially` | Triggers when an order payment enters status "Refunded partially" | +|`state_enter.order_transaction.state.reminded` | Triggers when an order payment enters status "Reminded" | +|`state_enter.order_transaction.state.unconfirmed` | Triggers when an order payment enters status "Unconfirmed" | +|`state_enter.order_transaction_capture.state.completed` | Triggers when a payment capture is fully completed | +|`state_enter.order_transaction_capture.state.failed` | Triggers when a payment capture attempt fails | +|`state_enter.order_transaction_capture.state.pending` | Triggers when a payment capture is initiated and waiting for completion | +|`state_enter.order_transaction_capture_refund.state.cancelled` | Triggers when a capture refund request is cancelled | +|`state_enter.order_transaction_capture_refund.state.completed` | Triggers when a capture refund is completed | +|`state_enter.order_transaction_capture_refund.state.failed` | Triggers when a capture refund fails | +|`state_enter.order_transaction_capture_refund.state.in_progress` | Triggers when a capture refund is currently being processed | +|`state_enter.order_transaction_capture_refund.state.open` | Triggers when a capture refund enters status "Open" | +|`state_leave.order.state.cancelled` | Triggers when an order leaves status "Cancelled" | +|`state_leave.order.state.completed` | Triggers when an order leaves status "Completed" | +|`state_leave.order.state.in_progress` | Triggers when an order leaves status "In progress" | +|`state_leave.order.state.open` | Triggers when an order leaves status "Open" | +|`state_leave.order_delivery.state.cancelled` | Triggers when an order delivery leaves status "Cancelled" | +|`state_leave.order_delivery.state.open` | Triggers when an order delivery leaves status "Open" | +|`state_leave.order_delivery.state.returned` | Triggers when an order delivery leaves status "Returned" | +|`state_leave.order_delivery.state.returned_partially` | Triggers when an order delivery leaves status "Return partially" | +|`state_leave.order_delivery.state.shipped` | Triggers when an order delivery leaves status "Shipped" | +|`state_leave.order_delivery.state.shipped_partially` | Triggers when an order delivery status is changed from “Shipped partially” | +|`state_leave.order_transaction.state.authorized` | Triggers when an order payment leaves status "Authorized" | +|`state_leave.order_transaction.state.cancelled` | Triggers when an order payment leaves status "Cancelled" | +|`state_leave.order_transaction.state.chargeback` | Triggers when an order payment leaves status "Chargeback" | +|`state_leave.order_transaction.state.failed` | Triggers when an order payment leaves status "Failed" | +|`state_leave.order_transaction.state.in_progress` | Triggers when an order payment leaves status "In progress" | +|`state_leave.order_transaction.state.open` | Triggers when an order payment leaves status "Open" | +|`state_leave.order_transaction.state.paid` | Triggers when an order payment leaves status "Paid" | +|`state_leave.order_transaction.state.paid_partially` | Triggers when an order payment leaves status "Paid partially" | +|`state_leave.order_transaction.state.refunded` | Triggers when an order payment leaves status "Refunded" | +|`state_leave.order_transaction.state.refunded_partially` | Triggers when an order payment leaves status "Refunded partially" | +|`state_leave.order_transaction.state.reminded` | Triggers when an order payment leaves status "Reminded" | +|`state_leave.order_transaction.state.unconfirmed` | Triggers when an order payment leaves status "Unconfirmed" | +|`state_leave.order_transaction_capture.state.completed` | Triggers when a payment capture leaves status "Completed" | +|`state_leave.order_transaction_capture.state.failed` | Triggers when a payment capture leaves status "Failed" | +|`state_leave.order_transaction_capture.state.pending` | Triggers when a payment capture leaves "Pending" status | +|`state_leave.order_transaction_capture_refund.state.cancelled` | Triggers when a capture refund leaves status "Cancelled" | +|`state_leave.order_transaction_capture_refund.state.completed` | Triggers when a capture refund leaves status "Completed" | +|`state_leave.order_transaction_capture_refund.state.failed` | Triggers when a capture refund leaves status "Failed" | +|`state_leave.order_transaction_capture_refund.state.in_progress` | Triggers when a capture refund leaves "In progress" status | +|`state_leave.order_transaction_capture_refund.state.open` | Triggers when a capture refund leaves status "Open" | +|`user.recovery.request` | Triggers when a user created a password recovery request at admin | diff --git a/resources/references/app-reference/script-reference/webhook-events-reference.md b/resources/references/app-reference/script-reference/webhook-events-reference.md new file mode 100644 index 0000000000..fb2ca19774 --- /dev/null +++ b/resources/references/app-reference/script-reference/webhook-events-reference.md @@ -0,0 +1,121 @@ +# Webhook Event Reference + +| Event | Description | Permissions needed | Payload +| :--- | :--- | :--- | :--- | +|`checkout.customer.before.login` | Triggers as soon as a customer logs in | - | {"email":"string"} +|`checkout.customer.deleted` | Triggers if a customer gets deleted | `customer:read` | {"entity":"customer"} +|`checkout.customer.double_opt_in_guest_order` | Triggers as soon as double opt-in is accepted in a guest order | `customer:read` | {"entity":"customer","confirmUrl":"string"} +|`checkout.customer.double_opt_in_registration` | Triggers when a customer commits to his registration via double opt in | `customer:read` | {"entity":"customer","confirmUrl":"string"} +|`checkout.customer.guest_register` | __EMPTY__ | `customer:read` | {"entity":"customer"} +|`checkout.customer.login` | Triggers as soon as a customer logs in | `customer:read` | {"entity":"customer","contextToken":"string"} +|`checkout.customer.logout` | Triggers when a customer logs out | `customer:read` | {"entity":"customer"} +|`checkout.customer.register` | Triggers when a new customer was registered | `customer:read` | {"entity":"customer"} +|`checkout.order.payment_method.changed` | __EMPTY__ | `order:read` `order_transaction:read` | {"entity":"order_transaction"} +|`checkout.order.placed` | Triggers when an order is placed | `order:read` | {"entity":"order"} +|`contact_form.send` | Triggers when a contact form is send | - | {"contactFormData":"object"} +|`customer.group.registration.accepted` | __EMPTY__ | `customer:read` `customer_group:read` | {"entity":"customer_group"} +|`customer.group.registration.declined` | __EMPTY__ | `customer:read` `customer_group:read` | {"entity":"customer_group"} +|`customer.password.changed` | __EMPTY__ | `customer:read` | {"entity":"customer","shopName":"string"} +|`customer.recovery.request` | Triggers when a customer recovers his password | `customer_recovery:read` `customer:read` | {"entity":"customer","resetUrl":"string","shopName":"string"} +|`mail.after.create.message` | __EMPTY__ | - | {"data":"array","message":"object"} +|`mail.before.send` | Triggers before a mail is send | - | {"data":"array","templateData":"array"} +|`mail.sent` | Triggers when a mail is send from Shopware | - | {"subject":"string","contents":"string","recipients":"array"} +|`newsletter.confirm` | __EMPTY__ | `newsletter_recipient:read` | {"entity":"newsletter_recipient"} +|`newsletter.register` | __EMPTY__ | `newsletter_recipient:read` | {"entity":"newsletter_recipient","url":"string"} +|`newsletter.unsubscribe` | __EMPTY__ | `newsletter_recipient:read` | {"entity":"newsletter_recipient"} +|`product_export.log` | __EMPTY__ | - | {"name":"string"} +|`review_form.send` | Triggers when a product review form is send | `product:read` | {"reviewFormData":"object","entity":"product"} +|`revocation_request.sent` | __EMPTY__ | - | {"revocationRequestFormData":"object"} +|`state_enter.order.state.cancelled` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_enter.order.state.completed` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_enter.order.state.in_progress` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_enter.order.state.open` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_enter.order_delivery.state.cancelled` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_enter.order_delivery.state.open` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_enter.order_delivery.state.returned` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_enter.order_delivery.state.returned_partially` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_enter.order_delivery.state.shipped` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_enter.order_delivery.state.shipped_partially` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_enter.order_transaction.state.authorized` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_enter.order_transaction.state.cancelled` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_enter.order_transaction.state.chargeback` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_enter.order_transaction.state.failed` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_enter.order_transaction.state.in_progress` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_enter.order_transaction.state.open` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_enter.order_transaction.state.paid` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_enter.order_transaction.state.paid_partially` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_enter.order_transaction.state.refunded` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_enter.order_transaction.state.refunded_partially` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_enter.order_transaction.state.reminded` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_enter.order_transaction.state.unconfirmed` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_enter.order_transaction_capture.state.completed` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_enter.order_transaction_capture.state.failed` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_enter.order_transaction_capture.state.pending` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_enter.order_transaction_capture_refund.state.cancelled` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_enter.order_transaction_capture_refund.state.completed` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_enter.order_transaction_capture_refund.state.failed` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_enter.order_transaction_capture_refund.state.in_progress` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_enter.order_transaction_capture_refund.state.open` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_leave.order.state.cancelled` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_leave.order.state.completed` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_leave.order.state.in_progress` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_leave.order.state.open` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_leave.order_delivery.state.cancelled` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_leave.order_delivery.state.open` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_leave.order_delivery.state.returned` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_leave.order_delivery.state.returned_partially` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_leave.order_delivery.state.shipped` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_leave.order_delivery.state.shipped_partially` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_leave.order_transaction.state.authorized` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_leave.order_transaction.state.cancelled` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_leave.order_transaction.state.chargeback` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_leave.order_transaction.state.failed` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_leave.order_transaction.state.in_progress` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_leave.order_transaction.state.open` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_leave.order_transaction.state.paid` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_leave.order_transaction.state.paid_partially` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_leave.order_transaction.state.refunded` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_leave.order_transaction.state.refunded_partially` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_leave.order_transaction.state.reminded` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_leave.order_transaction.state.unconfirmed` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_leave.order_transaction_capture.state.completed` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_leave.order_transaction_capture.state.failed` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_leave.order_transaction_capture.state.pending` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_leave.order_transaction_capture_refund.state.cancelled` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_leave.order_transaction_capture_refund.state.completed` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_leave.order_transaction_capture_refund.state.failed` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_leave.order_transaction_capture_refund.state.in_progress` | __EMPTY__ | `order:read` | {"entity":"order"} +|`state_leave.order_transaction_capture_refund.state.open` | __EMPTY__ | `order:read` | {"entity":"order"} +|`user.recovery.request` | __EMPTY__ | `user_recovery:read` | {"entity":"user_recovery","resetUrl":"string"} +|`sales_channel.written` | Triggers when a sales_channel is written | `sales_channel:read` | {"entity":"sales_channel","operation":"update insert","primaryKey":"array string","payload":"array"} +|`sales_channel.deleted` | Triggers when a sales_channel is deleted | `sales_channel:read` | {"entity":"sales_channel","operation":"deleted","primaryKey":"array string","payload":"array"} +|`sales_channel_domain.written` | Triggers when a sales_channel_domain is written | `sales_channel_domain:read` | {"entity":"sales_channel_domain","operation":"update insert","primaryKey":"array string","payload":"array"} +|`sales_channel_domain.deleted` | Triggers when a sales_channel_domain is deleted | `sales_channel_domain:read` | {"entity":"sales_channel_domain","operation":"deleted","primaryKey":"array string","payload":"array"} +|`category.written` | Triggers when a category is written | `category:read` | {"entity":"category","operation":"update insert","primaryKey":"array string","payload":"array"} +|`category.deleted` | Triggers when a category is deleted | `category:read` | {"entity":"category","operation":"deleted","primaryKey":"array string","payload":"array"} +|`media.written` | Triggers when a media is written | `media:read` | {"entity":"media","operation":"update insert","primaryKey":"array string","payload":"array"} +|`media.deleted` | Triggers when a media is deleted | `media:read` | {"entity":"media","operation":"deleted","primaryKey":"array string","payload":"array"} +|`product.written` | Triggers when a product is written | `product:read` | {"entity":"product","operation":"update insert","primaryKey":"array string","payload":"array"} +|`product.deleted` | Triggers when a product is deleted | `product:read` | {"entity":"product","operation":"deleted","primaryKey":"array string","payload":"array"} +|`product_price.written` | Triggers when a product_price is written | `product_price:read` | {"entity":"product_price","operation":"update insert","primaryKey":"array string","payload":"array"} +|`product_price.deleted` | Triggers when a product_price is deleted | `product_price:read` | {"entity":"product_price","operation":"deleted","primaryKey":"array string","payload":"array"} +|`customer.written` | Triggers when a customer is written | `customer:read` | {"entity":"customer","operation":"update insert","primaryKey":"array string","payload":"array"} +|`customer.deleted` | Triggers when a customer is deleted | `customer:read` | {"entity":"customer","operation":"deleted","primaryKey":"array string","payload":"array"} +|`customer_address.written` | Triggers when a customer_address is written | `customer_address:read` | {"entity":"customer_address","operation":"update insert","primaryKey":"array string","payload":"array"} +|`customer_address.deleted` | Triggers when a customer_address is deleted | `customer_address:read` | {"entity":"customer_address","operation":"deleted","primaryKey":"array string","payload":"array"} +|`document.written` | Triggers when a document is written | `document:read` | {"entity":"document","operation":"update insert","primaryKey":"array string","payload":"array"} +|`document.deleted` | Triggers when a document is deleted | `document:read` | {"entity":"document","operation":"deleted","primaryKey":"array string","payload":"array"} +|`order.written` | Triggers when a order is written | `order:read` | {"entity":"order","operation":"update insert","primaryKey":"array string","payload":"array"} +|`order.deleted` | Triggers when a order is deleted | `order:read` | {"entity":"order","operation":"deleted","primaryKey":"array string","payload":"array"} +|`order_address.written` | Triggers when a order_address is written | `order_address:read` | {"entity":"order_address","operation":"update insert","primaryKey":"array string","payload":"array"} +|`order_address.deleted` | Triggers when a order_address is deleted | `order_address:read` | {"entity":"order_address","operation":"deleted","primaryKey":"array string","payload":"array"} +|`media.uploaded` | Fires when a media file is uploaded | `media:read` | +|`app.activated` | Fires when an app is activated | - | +|`app.deactivated` | Fires when an app is deactivated | - | +|`app.deleted` | Fires when an app is deleted | - | +|`app.installed` | Fires when an app is installed | - | +|`app.updated` | Fires when an app is updated | - | +|`app.permissions.updated` | Fires when an apps permissions were updated with a list of the currently accepted permissions, eg after new were accepted or revoked | - | +|`shopware.updated` | Fires after an shopware update has been finished | - | +|`app.config.changed` | Fires when a system config value is changed | `system_config:read` | +|`app.system_heartbeat` | Fires as a recurrent task. Indicates to the app that the system is up and running. | - | From 8393584fe664a32ab742091ba9b3d918557d80fa Mon Sep 17 00:00:00 2001 From: Micha Date: Tue, 7 Apr 2026 14:42:24 +0200 Subject: [PATCH 2/4] retrigger/actions --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c5788decc5..6da18cc8b1 100644 --- a/README.md +++ b/README.md @@ -84,10 +84,10 @@ The `/docs/assets` folder stores images, videos, and other files linked in markd Certain files within the `shopware/shopware` repository are duplicated in the `shopware/docs` repository for reference purposes. Any modifications made to the former files will automatically synchronize with the corresponding files in the latter repository by the [`update-adrs`](./.github/workflows/update-adrs.yml) workflow. -| `shopware/shopware` files | `shopware/docs` files | -|-----------------------|-------------------------------------------| -| [shopware's adr](https://github.com/shopware/shopware/tree/trunk/adr) | [adr folder](./resources/references/adr/) | -| [adr assets](https://github.com/shopware/shopware/tree/trunk/adr/assets) | [assets adr folder](./assets/adr/) | +| `shopware/shopware` files | `shopware/docs` files | +|--------------------------------------------------------------------------------------------|-------------------------------------------| +| [shopware's adr](https://github.com/shopware/shopware/tree/trunk/adr) | [adr folder](./resources/references/adr/) | +| [adr assets](https://github.com/shopware/shopware/tree/trunk/adr/assets) | [assets adr folder](./assets/adr/) | | [coding guideline](https://github.com/shopware/shopware/tree/trunk/coding-guidelines/core) | [core](./resources/guidelines/code/core) | > Please create a PR in the [shopware](https://github.com/shopware/shopware/pulls) repository if you want to change something in the above folders. From 753c5aa7d2565f7ccd19c72225a37e0b2fd12f1d Mon Sep 17 00:00:00 2001 From: Micha Date: Tue, 7 Apr 2026 14:44:31 +0200 Subject: [PATCH 3/4] fix/md --- ...-manipulation-script-services-reference.md | 157 +++++++++++------- ...stom-endpoint-script-services-reference.md | 22 ++- .../data-loading-script-services-reference.md | 17 +- ...miscellaneous-script-services-reference.md | 46 ++--- .../product-script-services-reference.md | 41 +++-- .../script-hooks-reference.md | 1 - .../webhook-events-reference.md | 20 +-- 7 files changed, 181 insertions(+), 123 deletions(-) diff --git a/resources/references/app-reference/script-reference/cart-manipulation-script-services-reference.md b/resources/references/app-reference/script-reference/cart-manipulation-script-services-reference.md index 3af77edf46..722b79e26a 100644 --- a/resources/references/app-reference/script-reference/cart-manipulation-script-services-reference.md +++ b/resources/references/app-reference/script-reference/cart-manipulation-script-services-reference.md @@ -20,8 +20,9 @@ You can use the cart service to add line-items, change prices, add discounts, et Use this to get the correct prices after you made changes to the cart. Note that after calling the `calculate()` all collections (e.g. items(), products()) get new references, so if you still hold references to things inside the cart, these are outdated after calling `calculate()`. - + The `calculate()` method will be called automatically after your cart script executed. + ### count() * `count()` returns the count of line-items in this collection. @@ -30,11 +31,11 @@ You can use the cart service to add line-items, change prices, add discounts, et * **Returns** `int` The number of line-items in this collection. + ### discount() * The `discount()` methods creates a new discount line-item with the given type and value. - * **Returns** [`Shopware\Core\Checkout\Cart\Facade\DiscountFacade`](./cart-manipulation-script-services-reference#discountfacade) Returns the newly created discount line-item. @@ -64,6 +65,7 @@ You can use the cart service to add line-items, change prices, add discounts, et {% do services.cart.discount('my-discount', 'absolute', price, 'Fancy discount') %} ``` + * Add a relative discount to the cart. ```twig @@ -77,6 +79,7 @@ You can use the cart service to add line-items, change prices, add discounts, et {% do services.cart.discount('my-discount', 'percentage', -10, 'Fancy discount') %} ``` + ### errors() * The `errors()` method returns the current errors of the cart. @@ -85,34 +88,35 @@ You can use the cart service to add line-items, change prices, add discounts, et * **Returns** [`Shopware\Core\Checkout\Cart\Facade\ErrorsFacade`](./cart-manipulation-script-services-reference#errorsfacade) A `ErrorsFacade` containing all cart errors as a collection (may be an empty collection if there are no errors). + ### get() * `get()` returns the line-item with the given id from this collection. - * **Returns** [`Shopware\Core\Checkout\Cart\Facade\ItemFacade`](./cart-manipulation-script-services-reference#itemfacade) | `null` The line-item with the given id, or null if it does not exist. * **Arguments:** * *`string`* **id**: The id of the line-item that should be returned. + ### has() * `has()` checks if a line-item with the given id exists in this collection. - * **Returns** `bool` Returns true if the given line-item or a line-item with the given id already exists in the collection, false otherwise. * **Arguments:** * *`string|\ItemFacade`* **id**: The id or a line-item that should be checked if it already exists in the collection. + ### items() * The `items()` method returns all line-items of the current cart for further manipulation. - * **Returns** [`Shopware\Core\Checkout\Cart\Facade\ItemsFacade`](./cart-manipulation-script-services-reference#itemsfacade) A `ItemsFacade` containing all line-items in the current cart as a collection. + ### price() * The `price()` method returns the current price of the cart. @@ -122,6 +126,7 @@ You can use the cart service to add line-items, change prices, add discounts, et * **Returns** [`Shopware\Core\Checkout\Cart\Facade\CartPriceFacade`](./cart-manipulation-script-services-reference#cartpricefacade) The calculated price of the cart. + ### products() * The `product()` method returns all products of the current cart for further manipulation. @@ -130,11 +135,11 @@ You can use the cart service to add line-items, change prices, add discounts, et * **Returns** [`Shopware\Core\Checkout\Cart\Facade\ProductsFacade`](./cart-manipulation-script-services-reference#productsfacade) A `ProductsFacade` containing all product line-items in the current cart as a collection. + ### remove() * `remove()` removes the given line-item or the line-item with the given id from this collection. - * **Arguments:** * *`string|\ItemFacade`* **id**: The id of the line-item or the line-item that should be removed. * **Examples:** @@ -145,19 +150,19 @@ You can use the cart service to add line-items, change prices, add discounts, et {% do services.cart.products.remove(hook.ids.get('p1')) %} ``` + ### states() * `states()` allows you to access the state functions of the current cart. - * **Returns** [`Shopware\Core\Checkout\Cart\Facade\StatesFacade`](./cart-manipulation-script-services-reference#statesfacade) A `StatesFacade` containing all cart states as a collection (maybe an empty collection if there are no states). + ### surcharge() * The `surcharge()` methods creates a new surcharge line-item with the given type and value. - * **Returns** [`Shopware\Core\Checkout\Cart\Facade\DiscountFacade`](./cart-manipulation-script-services-reference#discountfacade) Returns the newly created surcharge line-item. @@ -179,6 +184,7 @@ You can use the cart service to add line-items, change prices, add discounts, et {% do services.cart.surcharge('my-surcharge', 'absolute', price, 'Fancy surcharge') %} ``` + * Add a relative surcharge to the cart. ```twig @@ -192,17 +198,17 @@ You can use the cart service to add line-items, change prices, add discounts, et {% do services.cart.surcharge('my-surcharge', 'percentage', -10, 'Fancy discount') %} ``` + _________ + ## [`Shopware\Core\Checkout\Cart\Facade\CartPriceFacade`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Cart/Facade/CartPriceFacade.php) {#cartpricefacade} The CartPriceFacade is a wrapper around the calculated price of a cart. - ### create() * `create()` creates a new `PriceCollection` based on an array of prices. - * **Returns** [`Shopware\Core\Framework\DataAbstractionLayer\Pricing\PriceCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Pricing/PriceCollection.php) Returns the newly created `PriceCollection`. @@ -216,14 +222,15 @@ The CartPriceFacade is a wrapper around the calculated price of a cart. 'default': { 'gross': 19.99, 'net': 19.99} }) %} ``` + ### getNet() * `getNet()` returns the net price of the cart. - * **Returns** `float` Returns the net price of the cart as float. + ### getPosition() * `getPosition()` returns the sum price of all line-items in the cart. @@ -233,22 +240,23 @@ The CartPriceFacade is a wrapper around the calculated price of a cart. * **Returns** `float` The position price as float. + ### getRaw() * `getRaw() returns the total price of the cart before rounding. - * **Returns** `float` The total price before rounding as float. + ### getRounded() * Alias for `getTotal()`. - * **Returns** `float` The rounded total price of the cart as float. + ### getTotal() * `getTotal()` returns the total price of the cart that has to be paid by the customer. @@ -258,17 +266,17 @@ The CartPriceFacade is a wrapper around the calculated price of a cart. * **Returns** `float` The rounded total price of the cart as float. + _________ + ## [`Shopware\Core\Checkout\Cart\Facade\ContainerFacade`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Cart/Facade/ContainerFacade.php) {#containerfacade} The ContainerFacade allows you to wrap multiple line-items inside a container line-item. - ### add() * Use the `add()` method to add an item to this container. - * **Returns** [`Shopware\Core\Checkout\Cart\Facade\ItemFacade`](./cart-manipulation-script-services-reference#itemfacade) The item that was added to the container. @@ -280,6 +288,7 @@ The ContainerFacade allows you to wrap multiple line-items inside a container li ```twig ``` + ### count() * `count()` returns the count of line-items in this collection. @@ -288,11 +297,11 @@ The ContainerFacade allows you to wrap multiple line-items inside a container li * **Returns** `int` The number of line-items in this collection. + ### discount() * The `discount()` methods creates a new discount line-item with the given type and value. - * **Returns** [`Shopware\Core\Checkout\Cart\Facade\DiscountFacade`](./cart-manipulation-script-services-reference#discountfacade) Returns the newly created discount line-item. @@ -322,6 +331,7 @@ The ContainerFacade allows you to wrap multiple line-items inside a container li {% do services.cart.discount('my-discount', 'absolute', price, 'Fancy discount') %} ``` + * Add a relative discount to the cart. ```twig @@ -335,64 +345,65 @@ The ContainerFacade allows you to wrap multiple line-items inside a container li {% do services.cart.discount('my-discount', 'percentage', -10, 'Fancy discount') %} ``` + ### get() * `get()` returns the line-item with the given id from this collection. - * **Returns** [`Shopware\Core\Checkout\Cart\Facade\ItemFacade`](./cart-manipulation-script-services-reference#itemfacade) | `null` The line-item with the given id, or null if it does not exist. * **Arguments:** * *`string`* **id**: The id of the line-item that should be returned. + ### getChildren() * `getChildren()` returns the child line-items of this line-item. - * **Returns** [`Shopware\Core\Checkout\Cart\Facade\ItemsFacade`](./cart-manipulation-script-services-reference#itemsfacade) Returns the children as a `ItemsFacade`, that may be empty if no children exist. + ### getId() * `getId()` returns the id of the line-item. - * **Returns** `string` Returns the id. + ### getLabel() * `getLabel()` returns the translated label of the line-item. - * **Returns** `string` | `null` Returns the translated label, or null if none exists. + ### getPayload() * `getPayload()` returns the payload of this line-item. - * **Returns** [`Shopware\Core\Framework\Script\Facade\ArrayFacade`](./miscellaneous-script-services-reference#arrayfacade) Returns the payload as `ArrayFacade`. + ### getPrice() * `getPrice()` returns the calculated price of the line-item. - * **Returns** [`Shopware\Core\Checkout\Cart\Facade\PriceFacade`](./cart-manipulation-script-services-reference#pricefacade) | `null` Returns the price of the line-item as a `PriceFacade` or null if the line-item has no calculated price. + ### getQuantity() * `getQuantity()` returns the quantity of the line-item. - * **Returns** `int` Returns the quantity. + ### getReferencedId() * `getReferenceId()` returns the id of the referenced entity of the line-item. @@ -401,6 +412,7 @@ The ContainerFacade allows you to wrap multiple line-items inside a container li * **Returns** `string` | `null` Returns the id of the referenced entity, or null if no entity is referenced. + ### getType() * `getType()` returns the type of this line-item. @@ -409,16 +421,17 @@ The ContainerFacade allows you to wrap multiple line-items inside a container li * **Returns** `string` The type of the line-item. + ### has() * `has()` checks if a line-item with the given id exists in this collection. - * **Returns** `bool` Returns true if the given line-item or a line-item with the given id already exists in the collection, false otherwise. * **Arguments:** * *`string|\ItemFacade`* **id**: The id or a line-item that should be checked if it already exists in the collection. + ### products() * The `product()` method returns all products inside the current container for further manipulation. @@ -427,11 +440,11 @@ The ContainerFacade allows you to wrap multiple line-items inside a container li * **Returns** [`Shopware\Core\Checkout\Cart\Facade\ProductsFacade`](./cart-manipulation-script-services-reference#productsfacade) A `ProductsFacade` containing all product line-items inside the current container as a collection. + ### remove() * `remove()` removes the given line-item or the line-item with the given id from this collection. - * **Arguments:** * *`string|\ItemFacade`* **id**: The id of the line-item or the line-item that should be removed. * **Examples:** @@ -442,11 +455,11 @@ The ContainerFacade allows you to wrap multiple line-items inside a container li {% do services.cart.products.remove(hook.ids.get('p1')) %} ``` + ### surcharge() * The `surcharge()` methods creates a new surcharge line-item with the given type and value. - * **Returns** [`Shopware\Core\Checkout\Cart\Facade\DiscountFacade`](./cart-manipulation-script-services-reference#discountfacade) Returns the newly created surcharge line-item. @@ -468,6 +481,7 @@ The ContainerFacade allows you to wrap multiple line-items inside a container li {% do services.cart.surcharge('my-surcharge', 'absolute', price, 'Fancy surcharge') %} ``` + * Add a relative surcharge to the cart. ```twig @@ -481,6 +495,7 @@ The ContainerFacade allows you to wrap multiple line-items inside a container li {% do services.cart.surcharge('my-surcharge', 'percentage', -10, 'Fancy discount') %} ``` + ### take() * `take()` splits an existing line-item by a given quantity. @@ -508,7 +523,9 @@ The ContainerFacade allows you to wrap multiple line-items inside a container li {% do services.cart.products.add(split) %} ``` + _________ + ## [`Shopware\Core\Checkout\Cart\Facade\DiscountFacade`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Cart/Facade/DiscountFacade.php) {#discountfacade} The DiscountFacade is a wrapper around a newly created discount. @@ -518,19 +535,20 @@ Note that this wrapper is independent from the line-item that was added for this * `getId()` returns the id of the line-item that was added with this discount. - * **Returns** `string` The id of the discount line-item. + ### getLabel() * `getLabel()` returns the translated label of the line-item that was added with this discount. - * **Returns** `string` | `null` The translated label of the discount line-item. + _________ + ## [`Shopware\Core\Checkout\Cart\Facade\ErrorsFacade`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Cart/Facade/ErrorsFacade.php) {#errorsfacade} The ErrorsFacade is a wrapper around the errors of a cart. @@ -556,26 +574,27 @@ You can use it to add new errors to the cart or remove existing ones. ```twig {% do services.cart.errors.error('NO_PRODUCTS_IN_CART') %} ``` + ### get() * The `get()` method returns the error with the given id. - * **Returns** [`Shopware\Core\Checkout\Cart\Error\Error`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Cart/Error/Error.php) | `null` The Error with the given id, null if an error with that id does not exist. * **Arguments:** * *`string`* **id**: The id of the error that should be returned. + ### has() * The `has()` method, checks if an error with a given id exists. - * **Returns** `bool` Returns true if an error with that key exists, false otherwise. * **Arguments:** * *`string`* **id**: The id of the error that should be checked. + ### notice() * The `notice()` method adds a new error of type `notice` to the cart. @@ -596,23 +615,26 @@ You can use it to add new errors to the cart or remove existing ones. ```twig {% do services.cart.errors.warning('ADD_PRODUCTS_OR_GO_AWAY') %} ``` + * Add a notice to the cart with a custom id. ```twig {% do services.cart.errors.notice('YOU_SHOULD_REALLY_ADD_PRODUCTS', 'add-same-message') %} ``` + * Add a notice to the cart with parameters. ```twig {% do services.cart.errors.notice('MESSAGE_WITH_PARAMETERS', null, {'foo': 'bar'}) %} ``` + ### remove() * The `remove()` method removes the error with the given id. - * **Arguments:** * *`string`* **id**: The id of the error that should be removed. + ### resubmittable() * The `resubmittable()` method adds a new error of type `error` to the cart. @@ -627,6 +649,7 @@ You can use it to add new errors to the cart or remove existing ones. Default: `array ( )` + ### warning() * The `warning()` method adds a new error of type `warning` to the cart. @@ -647,60 +670,61 @@ You can use it to add new errors to the cart or remove existing ones. ```twig {% do services.cart.errors.notice('YOU_SHOULD_REALLY_ADD_PRODUCTS') %} ``` + _________ + ## [`Shopware\Core\Checkout\Cart\Facade\ItemFacade`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Cart/Facade/ItemFacade.php) {#itemfacade} The ItemFacade is a wrapper around one line-item. - ### getChildren() * `getChildren()` returns the child line-items of this line-item. - * **Returns** [`Shopware\Core\Checkout\Cart\Facade\ItemsFacade`](./cart-manipulation-script-services-reference#itemsfacade) Returns the children as a `ItemsFacade`, that may be empty if no children exist. + ### getId() * `getId()` returns the id of the line-item. - * **Returns** `string` Returns the id. + ### getLabel() * `getLabel()` returns the translated label of the line-item. - * **Returns** `string` | `null` Returns the translated label, or null if none exists. + ### getPayload() * `getPayload()` returns the payload of this line-item. - * **Returns** [`Shopware\Core\Framework\Script\Facade\ArrayFacade`](./miscellaneous-script-services-reference#arrayfacade) Returns the payload as `ArrayFacade`. + ### getPrice() * `getPrice()` returns the calculated price of the line-item. - * **Returns** [`Shopware\Core\Checkout\Cart\Facade\PriceFacade`](./cart-manipulation-script-services-reference#pricefacade) | `null` Returns the price of the line-item as a `PriceFacade` or null if the line-item has no calculated price. + ### getQuantity() * `getQuantity()` returns the quantity of the line-item. - * **Returns** `int` Returns the quantity. + ### getReferencedId() * `getReferenceId()` returns the id of the referenced entity of the line-item. @@ -709,6 +733,7 @@ The ItemFacade is a wrapper around one line-item. * **Returns** `string` | `null` Returns the id of the referenced entity, or null if no entity is referenced. + ### getType() * `getType()` returns the type of this line-item. @@ -717,6 +742,7 @@ The ItemFacade is a wrapper around one line-item. * **Returns** `string` The type of the line-item. + ### take() * `take()` splits an existing line-item by a given quantity. @@ -744,17 +770,17 @@ The ItemFacade is a wrapper around one line-item. {% do services.cart.products.add(split) %} ``` + _________ + ## [`Shopware\Core\Checkout\Cart\Facade\ItemsFacade`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Cart/Facade/ItemsFacade.php) {#itemsfacade} The ItemsFacade is a wrapper around a collection of line-items. - ### add() * `add()` adds a line-item to this collection. - * **Returns** [`Shopware\Core\Checkout\Cart\Facade\ItemFacade`](./cart-manipulation-script-services-reference#itemfacade) Returns the added line-item. @@ -781,6 +807,7 @@ The ItemsFacade is a wrapper around a collection of line-items. {% do services.cart.discount('my-discount', 'absolute', price, 'Fancy discount') %} ``` + ### count() * `count()` returns the count of line-items in this collection. @@ -789,31 +816,31 @@ The ItemsFacade is a wrapper around a collection of line-items. * **Returns** `int` The number of line-items in this collection. + ### get() * `get()` returns the line-item with the given id from this collection. - * **Returns** [`Shopware\Core\Checkout\Cart\Facade\ItemFacade`](./cart-manipulation-script-services-reference#itemfacade) | `null` The line-item with the given id, or null if it does not exist. * **Arguments:** * *`string`* **id**: The id of the line-item that should be returned. + ### has() * `has()` checks if a line-item with the given id exists in this collection. - * **Returns** `bool` Returns true if the given line-item or a line-item with the given id already exists in the collection, false otherwise. * **Arguments:** * *`string|\ItemFacade`* **id**: The id or a line-item that should be checked if it already exists in the collection. + ### remove() * `remove()` removes the given line-item or the line-item with the given id from this collection. - * **Arguments:** * *`string|\ItemFacade`* **id**: The id of the line-item or the line-item that should be removed. * **Examples:** @@ -824,18 +851,18 @@ The ItemsFacade is a wrapper around a collection of line-items. {% do services.cart.products.remove(hook.ids.get('p1')) %} ``` + _________ + ## [`Shopware\Core\Checkout\Cart\Facade\PriceFacade`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Cart/Facade/PriceFacade.php) {#pricefacade} The PriceFacade is a wrapper around a price. - ### change() * `change()` allows a price overwrite of the current price scope. The provided price will be recalculated over the quantity price calculator to consider quantity, tax rule and cash rounding configurations. - * **Arguments:** * *[`Shopware\Core\Framework\DataAbstractionLayer\Pricing\PriceCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Pricing/PriceCollection.php)* **price**: The provided price can be a fetched price from the database or generated over the `PriceFactory` statically * **Examples:** @@ -848,11 +875,11 @@ over the quantity price calculator to consider quantity, tax rule and cash round { to: null, price: services.price.create({ 'default': { 'gross': 5, 'net': 5} }) }, ]) %} ``` + ### create() * `create()` creates a new `PriceCollection` based on an array of prices. - * **Returns** [`Shopware\Core\Framework\DataAbstractionLayer\Pricing\PriceCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Pricing/PriceCollection.php) Returns the newly created `PriceCollection`. @@ -866,6 +893,7 @@ over the quantity price calculator to consider quantity, tax rule and cash round 'default': { 'gross': 19.99, 'net': 19.99} }) %} ``` + ### discount() * `discount()` allows a percentage discount calculation of the current price scope. The provided value will be ensured to be negative via `abs(value) * -1`. @@ -879,38 +907,39 @@ over the quantity price calculator to consider quantity, tax rule and cash round ```twig {% do product.calculatedPrice.discount(10) %} ``` + ### getQuantity() * `getQuantity()` returns the quantity that was used to calculate the total price. - * **Returns** `int` Returns the quantity. + ### getRules() * `getRules()` returns the tax rules that were used to calculate the price. - * **Returns** [`Shopware\Core\Checkout\Cart\Tax\Struct\TaxRuleCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Cart/Tax/Struct/TaxRuleCollection.php) Returns the tax rules. + ### getTaxes() * `getTaxes()` returns the calculated taxes of the price. - * **Returns** [`Shopware\Core\Checkout\Cart\Tax\Struct\CalculatedTaxCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Cart/Tax/Struct/CalculatedTaxCollection.php) Returns the calculated taxes. + ### getTotal() * `getTotal()` returns the total price for the line-item. - * **Returns** `float` The total price as float. + ### getUnit() * `getUnit()` returns the unit price for the line-item. @@ -919,6 +948,7 @@ over the quantity price calculator to consider quantity, tax rule and cash round * **Returns** `float` The price per unit as float. + ### minus() * `minus()` allows a price subtraction of the current price scope. The provided price will be recalculated via the quantity price calculator. @@ -937,6 +967,7 @@ over the quantity price calculator to consider quantity, tax rule and cash round {% do product.calculatedPrice.minus(price) %} ``` + ### plus() * `plus()` allows a price addition of the current price scope. The provided price will be recalculated via the quantity price calculator. @@ -955,6 +986,7 @@ over the quantity price calculator to consider quantity, tax rule and cash round {% do product.calculatedPrice.plus(price) %} ``` + ### surcharge() * `surcharge()` allows a percentage surcharge calculation of the current price scope. The provided value will be ensured to be negative via `abs(value)`. @@ -968,17 +1000,17 @@ over the quantity price calculator to consider quantity, tax rule and cash round ```twig {% do product.calculatedPrice.surcharge(10) %} ``` + _________ + ## [services.price (`Shopware\Core\Checkout\Cart\Facade\PriceFactory`)](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Cart/Facade/PriceFactory.php) {#pricefactory} The PriceFacade is a wrapper around a price. - ### create() * `create()` creates a new `PriceCollection` based on an array of prices. - * **Returns** [`Shopware\Core\Framework\DataAbstractionLayer\Pricing\PriceCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Pricing/PriceCollection.php) Returns the newly created `PriceCollection`. @@ -992,12 +1024,13 @@ The PriceFacade is a wrapper around a price. 'default': { 'gross': 19.99, 'net': 19.99} }) %} ``` + _________ + ## [`Shopware\Core\Checkout\Cart\Facade\ProductsFacade`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Cart/Facade/ProductsFacade.php) {#productsfacade} The ProductsFacade is a wrapper around a collection of product line-items. - ### add() * `add()` adds a new product line-item to this collection. @@ -1017,6 +1050,7 @@ The ProductsFacade is a wrapper around a collection of product line-items. ```twig {% do services.cart.products.add(hook.ids.get('p1')) %} ``` + ### count() * `count()` returns the count of line-items in this collection. @@ -1025,6 +1059,7 @@ The ProductsFacade is a wrapper around a collection of product line-items. * **Returns** `int` The number of line-items in this collection. + ### create() * `create()` creates a new product line-item for the product with the given id in the given quantity. @@ -1038,11 +1073,11 @@ The ProductsFacade is a wrapper around a collection of product line-items. * *`int`* **quantity**: Optionally provide the quantity with which the product line-item should be created, defaults to 1. Default: `1` + ### get() * `get()` returns the product line-item with the given product id. - * **Returns** [`Shopware\Core\Checkout\Cart\Facade\ItemFacade`](./cart-manipulation-script-services-reference#itemfacade) | `null` The line-item associated with the given product id, or null if it does not exist. @@ -1054,21 +1089,21 @@ The ProductsFacade is a wrapper around a collection of product line-items. ```twig {% set product = services.cart.products.get(hook.ids.get('p1')) %} ``` + ### has() * `has()` checks if a line-item with the given id exists in this collection. - * **Returns** `bool` Returns true if the given line-item or a line-item with the given id already exists in the collection, false otherwise. * **Arguments:** * *`string|\ItemFacade`* **id**: The id or a line-item that should be checked if it already exists in the collection. + ### remove() * `remove()` removes the given line-item or the line-item with the given id from this collection. - * **Arguments:** * *`string|\ItemFacade`* **id**: The id of the line-item or the line-item that should be removed. * **Examples:** @@ -1079,12 +1114,13 @@ The ProductsFacade is a wrapper around a collection of product line-items. {% do services.cart.products.remove(hook.ids.get('p1')) %} ``` + _________ + ## [`Shopware\Core\Checkout\Cart\Facade\StatesFacade`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Cart/Facade/StatesFacade.php) {#statesfacade} The StatesFacade allows access to the current cart states and functions. - ### add() * `add()` allows you to add one or multiple states as string values to the cart. @@ -1092,29 +1128,30 @@ The StatesFacade allows access to the current cart states and functions. This can be useful to check if your script did already run and did some manipulations to the cart. * **Arguments:** * *`string`* **states**: One or more strings that will be stored on the cart. + ### get() * `get()` returns all states that are present on the cart. - * **Returns** `array` An array containing all current states of the cart. + ### has() * `has()` allows you to check if one or more states are present on the cart. - * **Returns** `bool` Returns true if at least one of the passed states is present on the cart, false otherwise. * **Arguments:** * *`string`* **states**: One or more strings that should be checked. + ### remove() * `remove()` removes the given state from the cart, if it existed. - * **Arguments:** * *`string`* **state**: The state that should be removed. + _________ diff --git a/resources/references/app-reference/script-reference/custom-endpoint-script-services-reference.md b/resources/references/app-reference/script-reference/custom-endpoint-script-services-reference.md index 2827a829ee..a957e1b8fe 100644 --- a/resources/references/app-reference/script-reference/custom-endpoint-script-services-reference.md +++ b/resources/references/app-reference/script-reference/custom-endpoint-script-services-reference.md @@ -12,12 +12,10 @@ nav: The `cache` service allows you to invalidate the cache if some entity is updated. - ### invalidate() * `invalidate()` allows you to invalidate all cache entries with the given tag. - * **Arguments:** * *`array`* **tags**: The tags for which all cache entries should be invalidated as array. * **Examples:** @@ -26,6 +24,7 @@ The `cache` service allows you to invalidate the cache if some entity is updated ```twig {% do services.cache.invalidate(['my-tag']) %} ``` + * Build tags based on written entities and invalidate those tags. ```twig @@ -42,6 +41,7 @@ The `cache` service allows you to invalidate the cache if some entity is updated {% do services.cache.invalidate(tags) %} ``` + * Build tags if products with a specific property is created and invalidate those tags. ```twig @@ -59,7 +59,9 @@ The `cache` service allows you to invalidate the cache if some entity is updated {% do services.cache.invalidate(tags) %} ``` + _________ + ## [services.writer (`Shopware\Core\Framework\DataAbstractionLayer\Facade\RepositoryWriterFacade`)](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Facade/RepositoryWriterFacade.php) {#repositorywriterfacade} The `writer` service allows you to write data, that is stored inside shopware. @@ -69,7 +71,6 @@ Keep in mind that your app needs to have the correct permissions for the data it * The `delete()` method allows you to delete entities from the database. - * **Returns** [`Shopware\Core\Framework\DataAbstractionLayer\Event\EntityWrittenContainerEvent`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Event/EntityWrittenContainerEvent.php) The WriteEvents that were generated by executing the `delete()`. @@ -84,11 +85,11 @@ Keep in mind that your app needs to have the correct permissions for the data it { 'id': hook.productId } ]) %} ``` + ### sync() * The `sync()` method allows you to execute updates and deletes to multiple entities in one method call. - * **Returns** [`Shopware\Core\Framework\Api\Sync\SyncResult`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Api/Sync/SyncResult.php) The result of the `sync()`. @@ -117,6 +118,7 @@ Keep in mind that your app needs to have the correct permissions for the data it {% do services.writer.sync(payload) %} ``` + ### upsert() * The `upsert()` method allows you to create or update entities inside the database. @@ -136,6 +138,7 @@ Keep in mind that your app needs to have the correct permissions for the data it { 'name': 'new Tax', 'taxRate': 99.9 } ]) %} ``` + * Update an existing entity. ```twig @@ -143,17 +146,17 @@ Keep in mind that your app needs to have the correct permissions for the data it { 'id': hook.productId, 'active': true } ]) %} ``` + _________ + ## [services.response (`Shopware\Core\Framework\Script\Api\ScriptResponseFactoryFacade`)](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Script/Api/ScriptResponseFactoryFacade.php) {#scriptresponsefactoryfacade} The `response` service allows you to create HTTP-Responses. - ### json() * The `json()` method allows you to create a JSON-Response. - * **Returns** [`Shopware\Core\Framework\Script\Api\ScriptResponse`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Script/Api/ScriptResponse.php) The created response object, remember to assign it to the hook with `hook.setResponse()`. @@ -169,6 +172,7 @@ The `response` service allows you to create HTTP-Responses. {% set response = services.response.json({ 'foo': 'bar' }) %} {% do hook.setResponse(response) %} ``` + * Search for products and return them in a JsonResponse. ```twig @@ -178,6 +182,7 @@ The `response` service allows you to create HTTP-Responses. {% set response = services.response.json({ 'products': products }) %} {% do hook.setResponse(response) %} ``` + * Provide a response to a ActionButtons request from the administration. ```twig @@ -193,11 +198,11 @@ The `response` service allows you to create HTTP-Responses. {% do hook.setResponse(response) %} ``` + ### redirect() * The `redirect()` method allows you to create a RedirectResponse. - * **Returns** [`Shopware\Core\Framework\Script\Api\ScriptResponse`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Script/Api/ScriptResponse.php) The created response object, remember to assign it to the hook with `hook.setResponse()`. @@ -214,12 +219,14 @@ The `response` service allows you to create HTTP-Responses. {% set response = services.response.redirect('api.product.detail', { 'path': productId }) %} {% do hook.setResponse(response) %} ``` + * Redirect to a storefront page. ```twig {% set response = services.response.redirect('frontend.detail.page', { 'productId': productId }) %} {% do hook.setResponse(response) %} ``` + ### render() * The `render()` method allows you to render a twig view with the parameters you provide and create a StorefrontResponse. @@ -248,4 +255,5 @@ The `response` service allows you to create HTTP-Responses. {% do hook.setResponse(response) %} ``` + _________ diff --git a/resources/references/app-reference/script-reference/data-loading-script-services-reference.md b/resources/references/app-reference/script-reference/data-loading-script-services-reference.md index e3507020ca..779de716b2 100644 --- a/resources/references/app-reference/script-reference/data-loading-script-services-reference.md +++ b/resources/references/app-reference/script-reference/data-loading-script-services-reference.md @@ -17,7 +17,6 @@ Keep in mind that your app needs to have the correct permissions for the data it * The `aggregate()` method allows you to execute aggregations specified in the given criteria. - * **Returns** [`Shopware\Core\Framework\DataAbstractionLayer\Search\AggregationResult\AggregationResultCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Search/AggregationResult/AggregationResultCollection.php) A `AggregationResultCollection` including the results of the aggregations you specified in the criteria. @@ -43,11 +42,11 @@ Keep in mind that your app needs to have the correct permissions for the data it 'sum': sumResult.getSum }) %} ``` + ### ids() * The `ids()` method allows you to search for the Ids of Entities that match a given criteria. - * **Returns** [`Shopware\Core\Framework\DataAbstractionLayer\Search\IdSearchResult`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Search/IdSearchResult.php) A `IdSearchResult` including all entity-ids that matched your criteria. @@ -73,11 +72,11 @@ Keep in mind that your app needs to have the correct permissions for the data it 'ids': productIds }) %} ``` + ### search() * The `search()` method allows you to search for Entities that match a given criteria. - * **Returns** [`Shopware\Core\Framework\DataAbstractionLayer\Search\EntitySearchResult`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Search/EntitySearchResult.php) A `EntitySearchResult` including all entities that matched your criteria. @@ -99,6 +98,7 @@ Keep in mind that your app needs to have the correct permissions for the data it {% do page.addExtension('myProduct', product) %} ``` + * Filter the search result. ```twig @@ -115,6 +115,7 @@ Keep in mind that your app needs to have the correct permissions for the data it {% do page.addExtension('myProduct', product) %} ``` + * Add associations that should be included in the result. ```twig @@ -133,7 +134,9 @@ Keep in mind that your app needs to have the correct permissions for the data it {% do page.addExtension('myProduct', product) %} {% do page.addExtension('myManufacturer', product.manufacturer) %} ``` + _________ + ## [services.store (`Shopware\Core\Framework\DataAbstractionLayer\Facade\SalesChannelRepositoryFacade`)](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Facade/SalesChannelRepositoryFacade.php) {#saleschannelrepositoryfacade} The `store` service can be used to access publicly available `store-api` data. @@ -147,7 +150,6 @@ this means that e.g. product prices are already calculated based on the current * The `aggregate()` method allows you to execute aggregations specified in the given criteria. - * **Returns** [`Shopware\Core\Framework\DataAbstractionLayer\Search\AggregationResult\AggregationResultCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Search/AggregationResult/AggregationResultCollection.php) A `AggregationResultCollection` including the results of the aggregations you specified in the criteria. @@ -173,11 +175,11 @@ this means that e.g. product prices are already calculated based on the current 'sum': sumResult.getSum }) %} ``` + ### ids() * The `ids()` method allows you to search for the Ids of Entities that match a given criteria. - * **Returns** [`Shopware\Core\Framework\DataAbstractionLayer\Search\IdSearchResult`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Search/IdSearchResult.php) A `IdSearchResult` including all entity-ids that matched your criteria. @@ -203,11 +205,11 @@ this means that e.g. product prices are already calculated based on the current 'ids': productIds }) %} ``` + ### search() * The `search()` method allows you to search for Entities that match a given criteria. - * **Returns** [`Shopware\Core\Framework\DataAbstractionLayer\Search\EntitySearchResult`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Search/EntitySearchResult.php) A `EntitySearchResult` including all entities that matched your criteria. @@ -229,6 +231,7 @@ this means that e.g. product prices are already calculated based on the current {% do page.addExtension('myProduct', product) %} ``` + * Filter the search result. ```twig @@ -245,6 +248,7 @@ this means that e.g. product prices are already calculated based on the current {% do page.addExtension('myProduct', product) %} ``` + * Add associations that should be included in the result. ```twig @@ -263,4 +267,5 @@ this means that e.g. product prices are already calculated based on the current {% do page.addExtension('myProduct', product) %} {% do page.addExtension('myManufacturer', product.manufacturer) %} ``` + _________ diff --git a/resources/references/app-reference/script-reference/miscellaneous-script-services-reference.md b/resources/references/app-reference/script-reference/miscellaneous-script-services-reference.md index 21207bfbc8..80d6d2989e 100644 --- a/resources/references/app-reference/script-reference/miscellaneous-script-services-reference.md +++ b/resources/references/app-reference/script-reference/miscellaneous-script-services-reference.md @@ -12,6 +12,7 @@ nav: The `request` service allows you to access the current request in the script Examples: + ```twig {% block response %} {% if services.request.method != "POST" %} @@ -31,10 +32,10 @@ Examples: * The method `cookies` returns all request cookies as an array. - * **Returns** `array` request cookies + ### headers() * The method `headers` returns all request headers as an array. @@ -43,38 +44,39 @@ Examples: * **Returns** `array` request headers + ### ip() * The ip method returns the real client ip address - * **Returns** `string` | `null` request client ip address + ### method() * The method returns the request method in upper case - * **Returns** `string` request method in upper case + ### pathInfo() * The method `pathInfo` returns the request path info. The path info can be also an internal link when a seo url is used. - * **Returns** `string` request path info + ### query() * The method `query` returns all query parameters as an array - * **Returns** `array` request query parameters + ### request() * The method `request` returns all post parameters as an array. @@ -83,33 +85,33 @@ Examples: * **Returns** `array` request post parameters + ### scheme() * The scheme method returns the request scheme - * **Returns** `string` request scheme + ### uri() * The method `uri` returns the request uri with the resolved url - * **Returns** `string` request uri + _________ + ## [services.acl (`Shopware\Core\Framework\Script\Api\AclFacade`)](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Script/Api/AclFacade.php) {#aclfacade} The `acl` service allows you to check if your app has been granted the specified privilege. - ### can() * The `can()` method allows you to check if your app has been granted the specified privilege. - * **Returns** `bool` Returns `true` if the privilege has been granted, `false` otherwise. @@ -129,12 +131,15 @@ The `acl` service allows you to check if your app has been granted the specified {% do page.addExtension('myProduct', product) %} {% endif %} ``` + _________ + ## [`Shopware\Core\Framework\Script\Facade\ArrayFacade`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Script/Facade/ArrayFacade.php) {#arrayfacade} The ArrayFacade acts as a wrapper around an array and allows easier manipulation of arrays inside scripts. An array facade can also be accessed like a "normal" array inside twig. Examples: + ```twig {% do array.push('test') %} @@ -151,23 +156,22 @@ Examples: * `all()` function returns all elements of this array. - * **Returns** `array` Returns all elements of this array. + ### count() * `count()` returns the count of elements inside this array. - * **Returns** `int` Returns the count of elements. + ### merge() * `merge()` recursively merges the array with the given array. - * **Arguments:** * *`array<string|int,mixed>|\ArrayFacade`* **array**: The array that should be merged with this array. Either a plain `array` or another `ArrayFacade`. * **Examples:** @@ -178,32 +182,32 @@ Examples: {% do product.payload.merge(my_array) %} ``` + ### push() * `push()` adds a new value to the end of the array. - * **Arguments:** * *`mixed`* **value**: The value that should be added. + ### remove() * `remove()` removes the given value from the array. It does nothing if the provided value does not exist in the array. - * **Arguments:** * *`mixed`* **value**: The value that should be removed. + ### removeBy() * `removeBy()` removes the value at the given index from the array. - * **Arguments:** * *`string|int`* **index**: The index that should be removed. + ### replace() * `replace()` recursively replaces elements from the given array into this array. - * **Arguments:** * *`array<string|int,mixed>|\ArrayFacade`* **array**: The array from which the elements should be replaced into this array. Either a plain `array` or another `ArrayFacade`. * **Examples:** @@ -214,16 +218,15 @@ Examples: {% do product.payload.replace(second) %} ``` + ### reset() * `reset()` removes all entries from the array. - ### set() * `set()` adds a new element to the array using the given key. - * **Arguments:** * *`string|int`* **key**: The array key. * *`mixed`* **value**: The value that should be added. @@ -235,12 +238,13 @@ Examples: {% do product.payload.set('test', 1) %} ``` + _________ + ## [services.config (`Shopware\Core\System\SystemConfig\Facade\SystemConfigFacade`)](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SystemConfig/Facade/SystemConfigFacade.php) {#systemconfigfacade} The `config` service allows you to access the shop's and your app's configuration values. - ### app() * The `app()` method allows you to access the config values your app's configuration. @@ -248,7 +252,6 @@ The `config` service allows you to access the shop's and your app's configuratio Notice that your app does not need any additional privileges to use this method, as you can only access your own app's configuration. * **Returns** `array<string,mixed>|bool|float|int|string|null` - * **Arguments:** * *`string`* **key**: The name of the configuration value specified in the config.xml e.g. `exampleTextField`. * *`string` | `null`* **salesChannelId**: The SalesChannelId if you need the config value for a specific SalesChannel, if you don't provide a SalesChannelId, the one of the current Context is used as default. @@ -260,6 +263,7 @@ The `config` service allows you to access the shop's and your app's configuratio ```twig {% set appConfig = services.config.app('app_config') %} ``` + ### get() * The `get()` method allows you to access all config values of the store. @@ -267,7 +271,6 @@ The `config` service allows you to access the shop's and your app's configuratio Notice that your app needs the `system_config:read` privilege to use this method. * **Returns** `array<string,mixed>|bool|float|int|string|null` - * **Arguments:** * *`string`* **key**: The key of the configuration value e.g. `core.listing.defaultSorting`. * *`string` | `null`* **salesChannelId**: The SalesChannelId if you need the config value for a specific SalesChannel, if you don't provide a SalesChannelId, the one of the current Context is used as default. @@ -279,4 +282,5 @@ The `config` service allows you to access the shop's and your app's configuratio ```twig {% set systemConfig = services.config.get('core.listing.productsPerPage') %} ``` + _________ diff --git a/resources/references/app-reference/script-reference/product-script-services-reference.md b/resources/references/app-reference/script-reference/product-script-services-reference.md index 94c03d2ec7..449a89908b 100644 --- a/resources/references/app-reference/script-reference/product-script-services-reference.md +++ b/resources/references/app-reference/script-reference/product-script-services-reference.md @@ -12,13 +12,11 @@ nav: The CheapestPriceFacade is a wrapper around the cheapest price of the product. - ### change() * `change()` allows to overwrite the cheapest price of the current price scope. The provided price will be recalculated over the quantity price calculator to consider quantity, tax rule and cash rounding configurations. - * **Arguments:** * *`\PriceFacade|\PriceCollection|\CalculatedPrice|null` | `null`* **price**: You can provide different values to overwrite the cheapest price. In case of null, it uses the original single price of the product. * *`bool`* **range**: Allows to switch the `hasRange` attribute of the cheapest price @@ -34,21 +32,23 @@ over the quantity price calculator to consider quantity, tax rule and cash round {% do variant.calculatedCheapestPrice.change(price) %} ``` + * Overwrite the cheapest price with the original price ```twig {% do variant.calculatedCheapestPrice.plus(price) %} ``` + * Discount the cheapest price by 10% ```twig {% do variant.calculatedCheapestPrice.discount(10) %} ``` + ### create() * `create()` creates a new `PriceCollection` based on an array of prices. - * **Returns** [`Shopware\Core\Framework\DataAbstractionLayer\Pricing\PriceCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Pricing/PriceCollection.php) Returns the newly created `PriceCollection`. @@ -62,6 +62,7 @@ over the quantity price calculator to consider quantity, tax rule and cash round 'default': { 'gross': 19.99, 'net': 19.99} }) %} ``` + ### discount() * `discount()` allows a percentage discount calculation of the current price scope. The provided value will be ensured to be negative via `abs(value) * -1`. @@ -75,38 +76,39 @@ over the quantity price calculator to consider quantity, tax rule and cash round ```twig {% do product.calculatedPrice.discount(10) %} ``` + ### getQuantity() * `getQuantity()` returns the quantity that was used to calculate the total price. - * **Returns** `int` Returns the quantity. + ### getRules() * `getRules()` returns the tax rules that were used to calculate the price. - * **Returns** [`Shopware\Core\Checkout\Cart\Tax\Struct\TaxRuleCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Cart/Tax/Struct/TaxRuleCollection.php) Returns the tax rules. + ### getTaxes() * `getTaxes()` returns the calculated taxes of the price. - * **Returns** [`Shopware\Core\Checkout\Cart\Tax\Struct\CalculatedTaxCollection`](https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Cart/Tax/Struct/CalculatedTaxCollection.php) Returns the calculated taxes. + ### getTotal() * `getTotal()` returns the total price for the line-item. - * **Returns** `float` The total price as float. + ### getUnit() * `getUnit()` returns the unit price for the line-item. @@ -115,6 +117,7 @@ over the quantity price calculator to consider quantity, tax rule and cash round * **Returns** `float` The price per unit as float. + ### minus() * `minus()` allows a price subtraction of the current price scope. The provided price will be recalculated via the quantity price calculator. @@ -133,6 +136,7 @@ over the quantity price calculator to consider quantity, tax rule and cash round {% do product.calculatedPrice.minus(price) %} ``` + ### plus() * `plus()` allows a price addition of the current price scope. The provided price will be recalculated via the quantity price calculator. @@ -151,17 +155,18 @@ over the quantity price calculator to consider quantity, tax rule and cash round {% do product.calculatedPrice.plus(price) %} ``` + ### reset() * `reset()` allows to reset the cheapest price to the original price of the product. - * **Examples:** * Reset the product price to default ```twig {% do variant.calculatedCheapestPrice.change(price) %} ``` + ### surcharge() * `surcharge()` allows a percentage surcharge calculation of the current price scope. The provided value will be ensured to be negative via `abs(value)`. @@ -175,20 +180,20 @@ over the quantity price calculator to consider quantity, tax rule and cash round ```twig {% do product.calculatedPrice.surcharge(10) %} ``` + _________ + ## [`Shopware\Core\Content\Product\Hook\Pricing\PriceCollectionFacade`](https://github.com/shopware/shopware/blob/trunk/src/Core/Content/Product/Hook/Pricing/PriceCollectionFacade.php) {#pricecollectionfacade} The PriceCollectionFacade is a wrapper around the calculated price collection of a product. It allows to manipulate the quantity prices by resetting or changing the price collection. - ### change() * The `change()` function allows a complete overwrite of the product quantity prices - * **Arguments:** - * *`array`* **changes**: + * *`array`* **changes**: * **Examples:** * Overwrite the product prices with a new quantity price graduation @@ -199,31 +204,30 @@ prices by resetting or changing the price collection. { to: null, price: services.price.create({ 'default': { 'gross': 5, 'net': 5} }) }, ]) %} ``` + ### count() * The `count()` function returns the number of prices which are stored inside this collection. - * **Returns** `int` Returns the number of prices which are stored inside this collection + ### reset() * The `reset()` functions allows to reset the complete price collection. - _________ + ## [`Shopware\Core\Content\Product\Hook\Pricing\ProductProxy`](https://github.com/shopware/shopware/blob/trunk/src/Core/Content/Product/Hook/Pricing/ProductProxy.php) {#productproxy} The `ProductProxy` is a wrapper for the `SalesChannelProductEntity`. It provides access to all properties of the product, but also wraps some data into helper facade classes like `PriceFacade` or `PriceCollectionFacade`. - ### __get() * The `__get()` function allows access to all properties of the [SalesChannelProductEntity](https://github.com/shopware/shopware/blob/trunk/src/Core/Content/Product/SalesChannel/SalesChannelProductEntity.php) - * **Returns** `mixed` | `null` Returns the value of the property. The value is `mixed` due to the fact that all properties are accessed via `__get()` @@ -237,31 +241,32 @@ but also wraps some data into helper facade classes like `PriceFacade` or `Price { to: null, price: services.price.create({ 'default': { 'gross': 5, 'net': 5} }) }, ]) %} ``` + ### calculatedCheapestPrice() * The `calculatedCheapestPrice` property returns the cheapest price of the product. The price object will be wrapped into a `PriceFacade` object which allows to manipulate the price. - * **Returns** [`Shopware\Core\Checkout\Cart\Facade\PriceFacade`](./cart-manipulation-script-services-reference#pricefacade) | `null` Returns a `PriceFacade` if the product has a calculated cheapest price, otherwise `null` + ### calculatedPrice() * The `calculatedPrice` property returns the price of the product. The price object will be wrapped into a `PriceFacade` object which allows to manipulate the price. - * **Returns** [`Shopware\Core\Checkout\Cart\Facade\PriceFacade`](./cart-manipulation-script-services-reference#pricefacade) | `null` Returns a `PriceFacade` if the product has a price, otherwise `null` + ### calculatedPrices() * The `calculatedPrices` property returns the price of the product. The price object will be wrapped into a `PriceCollectionFacade` object which allows to manipulate the collection. - * **Returns** [`Shopware\Core\Content\Product\Hook\Pricing\PriceCollectionFacade`](./product-script-services-reference#pricecollectionfacade) | `null` Returns a `PriceCollectionFacade` if the product has graduated prices, otherwise `null` + _________ diff --git a/resources/references/app-reference/script-reference/script-hooks-reference.md b/resources/references/app-reference/script-reference/script-hooks-reference.md index 0a1c04ce71..429749486b 100644 --- a/resources/references/app-reference/script-reference/script-hooks-reference.md +++ b/resources/references/app-reference/script-reference/script-hooks-reference.md @@ -671,4 +671,3 @@ All available hooks that can be used to manipulate products. | **Available Data** | context: [`Shopware\Core\Framework\Context`](https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/Context.php)
products: `array`
salesChannelContext: [`Shopware\Core\System\SalesChannel\SalesChannelContext`](https://github.com/shopware/shopware/blob/trunk/src/Core/System/SalesChannel/SalesChannelContext.php)
| | **Available Services** | [repository](./data-loading-script-services-reference#RepositoryFacade)
[price](./cart-manipulation-script-services-reference#PriceFactory)
[config](./miscellaneous-script-services-reference#SystemConfigFacade)
[store](./data-loading-script-services-reference#SalesChannelRepositoryFacade)
[acl](./miscellaneous-script-services-reference#AclFacade)
| | **Stoppable** | `false` | - diff --git a/resources/references/app-reference/script-reference/webhook-events-reference.md b/resources/references/app-reference/script-reference/webhook-events-reference.md index fb2ca19774..6be33e49d9 100644 --- a/resources/references/app-reference/script-reference/webhook-events-reference.md +++ b/resources/references/app-reference/script-reference/webhook-events-reference.md @@ -109,13 +109,13 @@ |`order.deleted` | Triggers when a order is deleted | `order:read` | {"entity":"order","operation":"deleted","primaryKey":"array string","payload":"array"} |`order_address.written` | Triggers when a order_address is written | `order_address:read` | {"entity":"order_address","operation":"update insert","primaryKey":"array string","payload":"array"} |`order_address.deleted` | Triggers when a order_address is deleted | `order_address:read` | {"entity":"order_address","operation":"deleted","primaryKey":"array string","payload":"array"} -|`media.uploaded` | Fires when a media file is uploaded | `media:read` | -|`app.activated` | Fires when an app is activated | - | -|`app.deactivated` | Fires when an app is deactivated | - | -|`app.deleted` | Fires when an app is deleted | - | -|`app.installed` | Fires when an app is installed | - | -|`app.updated` | Fires when an app is updated | - | -|`app.permissions.updated` | Fires when an apps permissions were updated with a list of the currently accepted permissions, eg after new were accepted or revoked | - | -|`shopware.updated` | Fires after an shopware update has been finished | - | -|`app.config.changed` | Fires when a system config value is changed | `system_config:read` | -|`app.system_heartbeat` | Fires as a recurrent task. Indicates to the app that the system is up and running. | - | +|`media.uploaded` | Fires when a media file is uploaded | `media:read` | +|`app.activated` | Fires when an app is activated | - | +|`app.deactivated` | Fires when an app is deactivated | - | +|`app.deleted` | Fires when an app is deleted | - | +|`app.installed` | Fires when an app is installed | - | +|`app.updated` | Fires when an app is updated | - | +|`app.permissions.updated` | Fires when an apps permissions were updated with a list of the currently accepted permissions, eg after new were accepted or revoked | - | +|`shopware.updated` | Fires after an shopware update has been finished | - | +|`app.config.changed` | Fires when a system config value is changed | `system_config:read` | +|`app.system_heartbeat` | Fires as a recurrent task. Indicates to the app that the system is up and running. | - | From 08097e2b061c78dfbcec936abea71400497a0e78 Mon Sep 17 00:00:00 2001 From: Micha Date: Tue, 7 Apr 2026 14:50:31 +0200 Subject: [PATCH 4/4] fix/spellcheck --- .wordlist.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.wordlist.txt b/.wordlist.txt index 4b9965aad5..09cb602adc 100644 --- a/.wordlist.txt +++ b/.wordlist.txt @@ -852,6 +852,8 @@ ReverseInherited ReviewFormDataAware ReviewFormDataStorer Reviewdog +RevocationRequest +RevocationRequestEvent Roadmap RouteResponse RuleConditionService @@ -1132,6 +1134,7 @@ YamlFileLoader ZSH accel acl +aclfacade actionAmount actionType actionability @@ -1273,6 +1276,7 @@ const const's contactFormData containerfacade +contextToken control copyToClipboard copyable @@ -1761,6 +1765,7 @@ previewable pricecollectionfacade pricefacade pricefactory +primaryKey productCountRoute productId productNumber @@ -1829,6 +1834,8 @@ rethrown retryability returnUrl revalidation +reviewFormData +revocationRequestFormData rfc roadmap rollbacking @@ -1952,6 +1959,7 @@ systemconfigfacade systemd tabindex teardown +templateData templated templating testFoo