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\PaymentMethodCollection onlyAvailable: bool salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext context: Shopware\Core\Framework\Context |
Available Services | repository config store |
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\ShippingMethodCollection onlyAvailable: bool salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext context: Shopware\Core\Framework\Context |
Available Services | repository config store |
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 | page: Shopware\Storefront\Page\Account\CustomerGroupRegistration\CustomerGroupRegistrationPage context: Shopware\Core\Framework\Context salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
Available Services | repository config store |
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 | page: Shopware\Storefront\Page\Account\Login\AccountLoginPage context: Shopware\Core\Framework\Context salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
Available Services | repository config store |
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 | page: Shopware\Storefront\Page\Account\Login\AccountLoginPage context: Shopware\Core\Framework\Context salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
Available Services | repository config store |
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 | page: Shopware\Storefront\Page\Account\Order\AccountEditOrderPage context: Shopware\Core\Framework\Context salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
Available Services | repository config store |
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 | page: Shopware\Storefront\Page\Account\Order\AccountOrderDetailPage context: Shopware\Core\Framework\Context salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
Available Services | repository config store |
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 | page: Shopware\Storefront\Page\Account\Order\AccountOrderPage context: Shopware\Core\Framework\Context salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
Available Services | repository config store |
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 | page: Shopware\Storefront\Page\Account\Overview\AccountOverviewPage context: Shopware\Core\Framework\Context salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
Available Services | repository config store |
Stoppable | false |
account-payment-method-page-loaded
Name | account-payment-method-page-loaded |
Since | 6.4.8.0 |
Class | Shopware\Storefront\Page\Account\PaymentMethod\AccountPaymentMethodPageLoadedHook |
Description | Triggered when the AccountPaymentMethodPage is loaded |
Available Data | page: Shopware\Storefront\Page\Account\PaymentMethod\AccountPaymentMethodPage context: Shopware\Core\Framework\Context salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
Available Services | repository config store |
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 | page: Shopware\Storefront\Page\Account\Profile\AccountProfilePage context: Shopware\Core\Framework\Context salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
Available Services | repository config store |
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 | page: Shopware\Storefront\Page\Account\Login\AccountLoginPage context: Shopware\Core\Framework\Context salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
Available Services | repository config store |
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 | page: Shopware\Storefront\Page\Address\Detail\AddressDetailPage context: Shopware\Core\Framework\Context salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
Available Services | repository config store |
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 | page: Shopware\Storefront\Page\Address\Listing\AddressListingPage context: Shopware\Core\Framework\Context salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
Available Services | repository config store |
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 | page: Shopware\Storefront\Page\Address\Listing\AddressListingPage context: Shopware\Core\Framework\Context salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
Available Services | repository config store |
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 | page: Shopware\Storefront\Page\Checkout\Cart\CheckoutCartPage context: Shopware\Core\Framework\Context salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
Available Services | repository config store |
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 | page: Shopware\Storefront\Page\Checkout\Confirm\CheckoutConfirmPage context: Shopware\Core\Framework\Context salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
Available Services | repository config store |
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 | page: Shopware\Storefront\Page\Checkout\Finish\CheckoutFinishPage context: Shopware\Core\Framework\Context salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
Available Services | repository config store |
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 | page: Shopware\Storefront\Page\Checkout\Offcanvas\OffcanvasCartPage context: Shopware\Core\Framework\Context salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
Available Services | repository config store |
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 | page: Shopware\Storefront\Page\Checkout\Offcanvas\OffcanvasCartPage context: Shopware\Core\Framework\Context salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
Available Services | repository config store |
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 | page: Shopware\Storefront\Page\Checkout\Register\CheckoutRegisterPage context: Shopware\Core\Framework\Context salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
Available Services | repository config store |
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 | page: Shopware\Core\Content\Cms\CmsPageEntity context: Shopware\Core\Framework\Context salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
Available Services | repository config store |
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 | page: Shopware\Storefront\Page\LandingPage\LandingPage context: Shopware\Core\Framework\Context salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
Available Services | repository config store |
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 | page: Shopware\Storefront\Page\Maintenance\MaintenancePage context: Shopware\Core\Framework\Context salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
Available Services | repository config store |
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 | page: Shopware\Storefront\Page\Navigation\NavigationPage context: Shopware\Core\Framework\Context salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
Available Services | repository config store |
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 | page: Shopware\Storefront\Page\Product\ProductPage context: Shopware\Core\Framework\Context salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
Available Services | repository config store |
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 | page: Shopware\Storefront\Page\Product\QuickView\MinimalQuickViewPage context: Shopware\Core\Framework\Context salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
Available Services | repository config store |
Stoppable | false |
product-reviews-loaded
Name | product-reviews-loaded |
Since | 6.4.8.0 |
Class | Shopware\Storefront\Page\Product\Review\ProductReviewsWidgetLoadedHook |
Description | Triggered when the ProductReviewsWidget is loaded |
Available Data | reviews: Shopware\Storefront\Page\Product\Review\ReviewLoaderResult context: Shopware\Core\Framework\Context salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
Available Services | repository config store |
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 | page: Shopware\Storefront\Page\Search\SearchPage context: Shopware\Core\Framework\Context salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
Available Services | repository config store |
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 | page: Shopware\Storefront\Page\Search\SearchPage context: Shopware\Core\Framework\Context salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
Available Services | repository config store |
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 | page: Shopware\Storefront\Page\Sitemap\SitemapPage context: Shopware\Core\Framework\Context salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
Available Services | repository config store |
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 | page: Shopware\Storefront\Page\Suggest\SuggestPage context: Shopware\Core\Framework\Context salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
Available Services | repository config store |
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 | page: Shopware\Storefront\Page\Wishlist\GuestWishlistPage context: Shopware\Core\Framework\Context salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
Available Services | repository config store |
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 | page: Shopware\Storefront\Page\Wishlist\WishlistPage context: Shopware\Core\Framework\Context salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
Available Services | repository config store |
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 | page: Shopware\Storefront\Page\Wishlist\WishlistPage context: Shopware\Core\Framework\Context salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
Available Services | repository config store |
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 | page: Shopware\Storefront\Pagelet\Menu\Offcanvas\MenuOffcanvasPagelet context: Shopware\Core\Framework\Context salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
Available Services | repository config store |
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 | page: Shopware\Storefront\Pagelet\Wishlist\GuestWishlistPagelet context: Shopware\Core\Framework\Context salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext |
Available Services | repository config store |
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\Cart salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext context: Shopware\Core\Framework\Context |
Available Services | cart config |
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 | event: Shopware\Core\Framework\Adapter\Cache\Script\Facade\WrittenEventScriptFacade context: Shopware\Core\Framework\Context |
Available Services | cache |
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 | request: array name: string context: Shopware\Core\Framework\Context isPropagationStopped: bool scriptResponse: Shopware\Core\Framework\Script\Api\ScriptResponse |
Available Services | repository writer config response |
Stoppable | true |
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 | request: array query: array salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext name: string cacheKey: string context: Shopware\Core\Framework\Context isPropagationStopped: bool |
Available Services | |
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 | request: array query: array salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext name: string context: Shopware\Core\Framework\Context scriptResponse: Shopware\Core\Framework\Script\Api\ScriptResponse isPropagationStopped: bool |
Available Services | repository config store writer response |
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 | request: array query: array salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext script: string page: Shopware\Storefront\Page\Page context: Shopware\Core\Framework\Context isPropagationStopped: bool scriptResponse: Shopware\Core\Framework\Script\Api\ScriptResponse |
Available Services | repository config store writer response |
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 | event: Shopware\Core\Framework\App\Event\AppActivatedEvent context: Shopware\Core\Framework\Context |
Available Services | repository config writer |
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 | event: Shopware\Core\Framework\App\Event\AppDeactivatedEvent context: Shopware\Core\Framework\Context |
Available Services | repository config writer |
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 | event: Shopware\Core\Framework\App\Event\AppDeletedEvent context: Shopware\Core\Framework\Context |
Available Services | repository config writer |
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 | event: Shopware\Core\Framework\App\Event\AppInstalledEvent context: Shopware\Core\Framework\Context |
Available Services | repository config writer |
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 | event: Shopware\Core\Framework\App\Event\AppUpdatedEvent context: Shopware\Core\Framework\Context |
Available Services | repository config writer |
Stoppable | false |