List of all available Hooks for Scripts
Data Loading
All available Hooks that can be used to load additional data.
payment-method-route-request
| Name | payment-method-route-request |
| 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\PaymentMethodCollectioncontext: Shopware\Core\Framework\ContextonlyAvailable: boolsalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store acl |
| Stoppable | false |
shipping-method-route-request
| Name | shipping-method-route-request |
| 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\ShippingMethodCollectioncontext: Shopware\Core\Framework\ContextonlyAvailable: boolsalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store acl |
| Stoppable | false |
cookie-group-collect
| Name | cookie-group-collect |
| Since | 6.7.14.0 |
| Class | Shopware\Core\Content\Cookie\Hook\CookieGroupCollectHook |
| Description | Triggered when the cookie consent groups are collected for the current sales channel. Allows apps to modify or remove cookie groups and entries, e.g., depending on the payment methods active in the current sales channel. |
| Available Data | context: Shopware\Core\Framework\ContextcookieGroups: Shopware\Core\Content\Cookie\Struct\CookieGroupCollectionsalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store acl |
| Stoppable | false |
product-reviews-widget-loaded
| Name | product-reviews-widget-loaded |
| Since | 6.6.9.0 |
| Class | Shopware\Core\Content\Product\SalesChannel\Review\ProductReviewsWidgetLoadedHook |
| Description | Triggered when the ProductReviewsWidget is loaded |
| Available Data | context: Shopware\Core\Framework\Contextreviews: Shopware\Core\Content\Product\SalesChannel\Review\ProductReviewResultsalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store acl |
| Stoppable | false |
customer-group-registration-page-loaded
| Name | customer-group-registration-page-loaded |
| Since | 6.4.8.0 |
| Class | Shopware\Storefront\Page\Account\CustomerGroupRegistration\CustomerGroupRegistrationPageLoadedHook |
| Description | Triggered when the CustomerGroupRegistrationPage is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpage: Shopware\Storefront\Page\Account\CustomerGroupRegistration\CustomerGroupRegistrationPagesalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
account-guest-login-page-loaded
| Name | account-guest-login-page-loaded |
| Since | 6.4.8.0 |
| Class | Shopware\Storefront\Page\Account\Login\AccountGuestLoginPageLoadedHook |
| Description | Triggered when the AccountGuestLoginPage is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpage: Shopware\Storefront\Page\Account\Login\AccountLoginPagesalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
account-login-page-loaded
| Name | account-login-page-loaded |
| Since | 6.4.8.0 |
| Class | Shopware\Storefront\Page\Account\Login\AccountLoginPageLoadedHook |
| Description | Triggered when the AccountLoginPage is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpage: Shopware\Storefront\Page\Account\Login\AccountLoginPagesalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
account-edit-order-page-loaded
| Name | account-edit-order-page-loaded |
| Since | 6.4.8.0 |
| Class | Shopware\Storefront\Page\Account\Order\AccountEditOrderPageLoadedHook |
| Description | Triggered when the AccountEditOrderPage is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpage: Shopware\Storefront\Page\Account\Order\AccountEditOrderPagesalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
account-order-detail-page-loaded
| Name | account-order-detail-page-loaded |
| Since | 6.4.8.0 |
| Class | Shopware\Storefront\Page\Account\Order\AccountOrderDetailPageLoadedHook |
| Description | Triggered when the AccountOrderDetailPage is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpage: Shopware\Storefront\Page\Account\Order\AccountOrderDetailPagesalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
account-order-page-loaded
| Name | account-order-page-loaded |
| Since | 6.4.8.0 |
| Class | Shopware\Storefront\Page\Account\Order\AccountOrderPageLoadedHook |
| Description | Triggered when the AccountOrderPage is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpage: Shopware\Storefront\Page\Account\Order\AccountOrderPagesalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
account-overview-page-loaded
| Name | account-overview-page-loaded |
| Since | 6.4.8.0 |
| Class | Shopware\Storefront\Page\Account\Overview\AccountOverviewPageLoadedHook |
| Description | Triggered when the AccountOverviewPage is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpage: Shopware\Storefront\Page\Account\Overview\AccountOverviewPagesalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
account-profile-page-loaded
| Name | account-profile-page-loaded |
| Since | 6.4.8.0 |
| Class | Shopware\Storefront\Page\Account\Profile\AccountProfilePageLoadedHook |
| Description | Triggered when the AccountProfilePage is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpage: Shopware\Storefront\Page\Account\Profile\AccountProfilePagesalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
account-recover-password-page-loaded
| Name | account-recover-password-page-loaded |
| Since | 6.4.13.0 |
| Class | Shopware\Storefront\Page\Account\RecoverPassword\AccountRecoverPasswordPageLoadedHook |
| Description | Triggered when the AccountRecoverPasswordPage is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpage: Shopware\Storefront\Page\Account\RecoverPassword\AccountRecoverPasswordPagesalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
account-register-page-loaded
| Name | account-register-page-loaded |
| Since | 6.4.8.0 |
| Class | Shopware\Storefront\Page\Account\Register\AccountRegisterPageLoadedHook |
| Description | Triggered when the AccountLoginPage is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpage: Shopware\Storefront\Page\Account\Login\AccountLoginPagesalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
address-detail-page-loaded
| Name | address-detail-page-loaded |
| Since | 6.4.8.0 |
| Class | Shopware\Storefront\Page\Address\Detail\AddressDetailPageLoadedHook |
| Description | Triggered when the AddressDetailPage is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpage: Shopware\Storefront\Page\Address\Detail\AddressDetailPagesalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
address-book-widget-loaded
| Name | address-book-widget-loaded |
| Since | 6.4.8.0 |
| Class | Shopware\Storefront\Page\Address\Listing\AddressBookWidgetLoadedHook |
| Description | Triggered when the AddressBookWidget is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpage: Shopware\Storefront\Page\Address\Listing\AddressListingPagesalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
address-listing-page-loaded
| Name | address-listing-page-loaded |
| Since | 6.4.8.0 |
| Class | Shopware\Storefront\Page\Address\Listing\AddressListingPageLoadedHook |
| Description | Triggered when the AddressListingPage is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpage: Shopware\Storefront\Page\Address\Listing\AddressListingPagesalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
checkout-cart-page-loaded
| Name | checkout-cart-page-loaded |
| Since | 6.4.8.0 |
| Class | Shopware\Storefront\Page\Checkout\Cart\CheckoutCartPageLoadedHook |
| Description | Triggered when the CheckoutCartPage is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpage: Shopware\Storefront\Page\Checkout\Cart\CheckoutCartPagesalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
checkout-confirm-page-loaded
| Name | checkout-confirm-page-loaded |
| Since | 6.4.8.0 |
| Class | Shopware\Storefront\Page\Checkout\Confirm\CheckoutConfirmPageLoadedHook |
| Description | Triggered when the CheckoutConfirmPage is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpage: Shopware\Storefront\Page\Checkout\Confirm\CheckoutConfirmPagesalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
checkout-finish-page-loaded
| Name | checkout-finish-page-loaded |
| Since | 6.4.8.0 |
| Class | Shopware\Storefront\Page\Checkout\Finish\CheckoutFinishPageLoadedHook |
| Description | Triggered when the CheckoutFinishPage is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpage: Shopware\Storefront\Page\Checkout\Finish\CheckoutFinishPagesalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
checkout-info-widget-loaded
| Name | checkout-info-widget-loaded |
| Since | 6.4.8.0 |
| Class | Shopware\Storefront\Page\Checkout\Offcanvas\CheckoutInfoWidgetLoadedHook |
| Description | Triggered when the CheckoutInfoWidget is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpage: Shopware\Storefront\Page\Checkout\Offcanvas\OffcanvasCartPagesalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
checkout-offcanvas-widget-loaded
| Name | checkout-offcanvas-widget-loaded |
| Since | 6.4.8.0 |
| Class | Shopware\Storefront\Page\Checkout\Offcanvas\CheckoutOffcanvasWidgetLoadedHook |
| Description | Triggered when the CheckoutOffcanvasWidget is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpage: Shopware\Storefront\Page\Checkout\Offcanvas\OffcanvasCartPagesalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
checkout-register-page-loaded
| Name | checkout-register-page-loaded |
| Since | 6.4.8.0 |
| Class | Shopware\Storefront\Page\Checkout\Register\CheckoutRegisterPageLoadedHook |
| Description | Triggered when the CheckoutRegisterPage is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpage: Shopware\Storefront\Page\Checkout\Register\CheckoutRegisterPagesalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
cms-page-loaded
| Name | cms-page-loaded |
| Since | 6.4.8.0 |
| Class | Shopware\Storefront\Page\Cms\CmsPageLoadedHook |
| Description | Triggered when a CmsPage is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpage: Shopware\Core\Content\Cms\CmsPageEntitysalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
landing-page-loaded
| Name | landing-page-loaded |
| Since | 6.4.8.0 |
| Class | Shopware\Storefront\Page\LandingPage\LandingPageLoadedHook |
| Description | Triggered when the LandingPage is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpage: Shopware\Storefront\Page\LandingPage\LandingPagesalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
maintenance-page-loaded
| Name | maintenance-page-loaded |
| Since | 6.4.8.0 |
| Class | Shopware\Storefront\Page\Maintenance\MaintenancePageLoadedHook |
| Description | Triggered when the MaintenancePage is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpage: Shopware\Storefront\Page\Maintenance\MaintenancePagesalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
navigation-page-loaded
| Name | navigation-page-loaded |
| Since | 6.4.8.0 |
| Class | Shopware\Storefront\Page\Navigation\NavigationPageLoadedHook |
| Description | Triggered when the NavigationPage is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpage: Shopware\Storefront\Page\Navigation\NavigationPagesalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
product-page-loaded
| Name | product-page-loaded |
| Since | 6.4.8.0 |
| Class | Shopware\Storefront\Page\Product\ProductPageLoadedHook |
| Description | Triggered when the ProductPage is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpage: Shopware\Storefront\Page\Product\ProductPagesalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
product-quick-view-widget-loaded
| Name | product-quick-view-widget-loaded |
| Since | 6.4.8.0 |
| Class | Shopware\Storefront\Page\Product\QuickView\ProductQuickViewWidgetLoadedHook |
| Description | Triggered when the ProductQuickViewWidget is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpage: Shopware\Storefront\Page\Product\QuickView\MinimalQuickViewPagesalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
search-page-loaded
| Name | search-page-loaded |
| Since | 6.4.8.0 |
| Class | Shopware\Storefront\Page\Search\SearchPageLoadedHook |
| Description | Triggered when the SearchPage is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpage: Shopware\Storefront\Page\Search\SearchPagesalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
search-widget-loaded
| Name | search-widget-loaded |
| Since | 6.4.8.0 |
| Class | Shopware\Storefront\Page\Search\SearchWidgetLoadedHook |
| Description | Triggered when the SearchWidget is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpage: Shopware\Storefront\Page\Search\SearchPagesalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
sitemap-page-loaded
| Name | sitemap-page-loaded |
| Since | 6.4.8.0 |
| Class | Shopware\Storefront\Page\Sitemap\SitemapPageLoadedHook |
| Description | Triggered when the SitemapPage is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpage: Shopware\Storefront\Page\Sitemap\SitemapPagesalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
suggest-page-loaded
| Name | suggest-page-loaded |
| Since | 6.4.8.0 |
| Class | Shopware\Storefront\Page\Suggest\SuggestPageLoadedHook |
| Description | Triggered when the SuggestPage is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpage: Shopware\Storefront\Page\Suggest\SuggestPagesalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
guest-wishlist-page-loaded
| Name | guest-wishlist-page-loaded |
| Since | 6.4.8.0 |
| Class | Shopware\Storefront\Page\Wishlist\GuestWishlistPageLoadedHook |
| Description | Triggered when the GuestWishlistPage is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpage: Shopware\Storefront\Page\Wishlist\GuestWishlistPagesalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
wishlist-page-loaded
| Name | wishlist-page-loaded |
| Since | 6.4.8.0 |
| Class | Shopware\Storefront\Page\Wishlist\WishlistPageLoadedHook |
| Description | Triggered when the WishlistPage is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpage: Shopware\Storefront\Page\Wishlist\WishlistPagesalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
wishlist-widget-loaded
| Name | wishlist-widget-loaded |
| Since | 6.4.8.0 |
| Class | Shopware\Storefront\Page\Wishlist\WishlistWidgetLoadedHook |
| Description | Triggered when the WishlistWidget is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpage: Shopware\Storefront\Page\Wishlist\WishlistPagesalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
country-state-data-pagelet-loaded
| Name | country-state-data-pagelet-loaded |
| Since | 6.4.8.0 |
| Class | Shopware\Storefront\Pagelet\Country\CountryStateDataPageletLoadedHook |
| Description | Triggered when the CountryStateDataPagelet is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpagelet: Shopware\Storefront\Pagelet\Country\CountryStateDataPageletsalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
footer-pagelet-loaded
| Name | footer-pagelet-loaded |
| Since | 6.7.0.0 |
| Class | Shopware\Storefront\Pagelet\Footer\FooterPageletLoadedHook |
| Description | Triggered when the FooterPagelet is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpage: Shopware\Storefront\Pagelet\Footer\FooterPageletsalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
header-pagelet-loaded
| Name | header-pagelet-loaded |
| Since | 6.7.0.0 |
| Class | Shopware\Storefront\Pagelet\Header\HeaderPageletLoadedHook |
| Description | Triggered when the HeaderPagelet is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpage: Shopware\Storefront\Pagelet\Header\HeaderPageletsalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
menu-offcanvas-pagelet-loaded
| Name | menu-offcanvas-pagelet-loaded |
| Since | 6.4.8.0 |
| Class | Shopware\Storefront\Pagelet\Menu\Offcanvas\MenuOffcanvasPageletLoadedHook |
| Description | Triggered when the MenuOffcanvasPagelet is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpage: Shopware\Storefront\Pagelet\Menu\Offcanvas\MenuOffcanvasPageletsalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
guest-wishlist-pagelet-loaded
| Name | guest-wishlist-pagelet-loaded |
| Since | 6.4.8.0 |
| Class | Shopware\Storefront\Pagelet\Wishlist\GuestWishlistPageletLoadedHook |
| Description | Triggered when the GuestWishlistPagelet is loaded |
| Available Data | context: Shopware\Core\Framework\Contextpage: Shopware\Storefront\Pagelet\Wishlist\GuestWishlistPageletsalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository config store request acl |
| Stoppable | false |
Cart Manipulation
All available Hooks that can be used to manipulate the cart.
cart
| Name | cart |
| Since | 6.4.8.0 |
| Class | Shopware\Core\Checkout\Cart\Hook\CartHook |
| Description | Triggered during the cart calculation process. |
| Available Data | cart: Shopware\Core\Checkout\Cart\Cartcontext: Shopware\Core\Framework\ContextsalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | cart price config acl |
| Stoppable | false |
Custom API endpoint
All available hooks within the Store-API and API
cache-invalidation
| Name | cache-invalidation |
| Since | 6.4.9.0 |
| Class | Shopware\Core\Framework\Adapter\Cache\Script\CacheInvalidationHook |
| Description | Triggered whenever an entity is written. |
| Available Data | context: Shopware\Core\Framework\Contextevent: Shopware\Core\Framework\Adapter\Cache\Script\Facade\WrittenEventScriptFacade |
| Available Services | cache acl |
| Stoppable | false |
api-
| Name | 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 | context: Shopware\Core\Framework\ContextisPropagationStopped: boolname: stringrequest: arrayscriptResponse: Shopware\Core\Framework\Script\Api\ScriptResponse |
| Available Services | repository writer config response acl |
| Stoppable | true |
response
| 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\Contextresponse: Symfony\Component\HttpFoundation\ResponserouteName: stringrouteScopes: array |
| Available Services | acl |
| Stoppable | false |
store-api-
Interface Hook
Triggered when the api endpoint /store-api/script/{hook} is called. Used to execute your logic and provide a response to the request.
Function: cache_key
| Name | cache_key |
| Since | 6.4.9.0 |
| 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: stringcontext: Shopware\Core\Framework\ContextisPropagationStopped: boolname: stringquery: arrayrequest: arraysalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | acl |
| Stoppable | true |
Function: response
| Name | response |
| Since | 6.4.9.0 |
| 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 | context: Shopware\Core\Framework\ContextisPropagationStopped: boolname: stringquery: arrayrequest: arraysalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContextscriptResponse: Shopware\Core\Framework\Script\Api\ScriptResponse |
| Available Services | repository config store writer response request acl |
| Stoppable | true |
storefront-
| Name | storefront- |
| 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 | context: Shopware\Core\Framework\ContextisPropagationStopped: boolpage: Shopware\Storefront\Page\Pagequery: arrayrequest: arraysalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContextscript: stringscriptResponse: Shopware\Core\Framework\Script\Api\ScriptResponse |
| Available Services | repository config store writer response request acl |
| Stoppable | true |
App Lifecycle
All available hooks that can be used to execute scripts during your app's lifecycle.
app-activated
| Name | app-activated |
| Since | 6.4.9.0 |
| Class | Shopware\Core\Framework\App\Event\Hooks\AppActivatedHook |
| Description | Triggered when your app is activated. |
| Available Data | context: Shopware\Core\Framework\Contextevent: Shopware\Core\Framework\App\Event\AppActivatedEvent |
| Available Services | repository config writer acl |
| Stoppable | false |
app-deactivated
| Name | app-deactivated |
| Since | 6.4.9.0 |
| Class | Shopware\Core\Framework\App\Event\Hooks\AppDeactivatedHook |
| Description | Triggered when your app is deactivated. |
| Available Data | context: Shopware\Core\Framework\Contextevent: Shopware\Core\Framework\App\Event\AppDeactivatedEvent |
| Available Services | repository config writer acl |
| Stoppable | false |
app-deleted
| Name | app-deleted |
| Since | 6.4.9.0 |
| Class | Shopware\Core\Framework\App\Event\Hooks\AppDeletedHook |
| Description | Triggered when your app is deleted. |
| Available Data | context: Shopware\Core\Framework\Contextevent: Shopware\Core\Framework\App\Event\AppDeletedEvent |
| Available Services | repository config writer acl |
| Stoppable | false |
app-installed
| Name | app-installed |
| Since | 6.4.9.0 |
| Class | Shopware\Core\Framework\App\Event\Hooks\AppInstalledHook |
| Description | Triggered when your app is installed. |
| Available Data | context: Shopware\Core\Framework\Contextevent: Shopware\Core\Framework\App\Event\AppInstalledEvent |
| Available Services | repository config writer acl |
| Stoppable | false |
app-updated
| Name | app-updated |
| Since | 6.4.9.0 |
| Class | Shopware\Core\Framework\App\Event\Hooks\AppUpdatedHook |
| Description | Triggered when your app is updated. |
| Available Data | context: Shopware\Core\Framework\Contextevent: Shopware\Core\Framework\App\Event\AppUpdatedEvent |
| Available Services | repository config writer acl |
| Stoppable | false |
Product
All available hooks that can be used to manipulate products.
product-pricing
| Name | product-pricing |
| 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 | context: Shopware\Core\Framework\Contextproducts: arraysalesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
| Available Services | repository price config store acl |
| Stoppable | false |