Skip to content

List of all available Hooks for Scripts

List of all available Hooks for Scripts

Data Loading

All available Hooks that can be used to load additional data.

payment-method-route-request

Namepayment-method-route-request
Since6.5.0.0
ClassShopware\Core\Checkout\Payment\Hook\PaymentMethodRouteHook
DescriptionTriggered when PaymentMethodRoute is requested
Available Datacollection: Shopware\Core\Checkout\Payment\PaymentMethodCollection
onlyAvailable: bool
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
context: Shopware\Core\Framework\Context
Available Servicesrepository
config
store
Stoppablefalse

shipping-method-route-request

Nameshipping-method-route-request
Since6.5.0.0
ClassShopware\Core\Checkout\Shipping\Hook\ShippingMethodRouteHook
DescriptionTriggered when ShippingMethodRoute is requested
Available Datacollection: Shopware\Core\Checkout\Shipping\ShippingMethodCollection
onlyAvailable: bool
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
context: Shopware\Core\Framework\Context
Available Servicesrepository
config
store
Stoppablefalse

customer-group-registration-page-loaded

Namecustomer-group-registration-page-loaded
Since6.4.8.0
ClassShopware\Storefront\Page\Account\CustomerGroupRegistration\CustomerGroupRegistrationPageLoadedHook
DescriptionTriggered when the CustomerGroupRegistrationPage is loaded
Available Datapage: Shopware\Storefront\Page\Account\CustomerGroupRegistration\CustomerGroupRegistrationPage
context: Shopware\Core\Framework\Context
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
Available Servicesrepository
config
store
Stoppablefalse

account-guest-login-page-loaded

Nameaccount-guest-login-page-loaded
Since6.4.8.0
ClassShopware\Storefront\Page\Account\Login\AccountGuestLoginPageLoadedHook
DescriptionTriggered when the AccountGuestLoginPage is loaded
Available Datapage: Shopware\Storefront\Page\Account\Login\AccountLoginPage
context: Shopware\Core\Framework\Context
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
Available Servicesrepository
config
store
Stoppablefalse

account-login-page-loaded

Nameaccount-login-page-loaded
Since6.4.8.0
ClassShopware\Storefront\Page\Account\Login\AccountLoginPageLoadedHook
DescriptionTriggered when the AccountLoginPage is loaded
Available Datapage: Shopware\Storefront\Page\Account\Login\AccountLoginPage
context: Shopware\Core\Framework\Context
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
Available Servicesrepository
config
store
Stoppablefalse

account-edit-order-page-loaded

Nameaccount-edit-order-page-loaded
Since6.4.8.0
ClassShopware\Storefront\Page\Account\Order\AccountEditOrderPageLoadedHook
DescriptionTriggered when the AccountEditOrderPage is loaded
Available Datapage: Shopware\Storefront\Page\Account\Order\AccountEditOrderPage
context: Shopware\Core\Framework\Context
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
Available Servicesrepository
config
store
Stoppablefalse

account-order-detail-page-loaded

Nameaccount-order-detail-page-loaded
Since6.4.8.0
ClassShopware\Storefront\Page\Account\Order\AccountOrderDetailPageLoadedHook
DescriptionTriggered when the AccountOrderDetailPage is loaded
Available Datapage: Shopware\Storefront\Page\Account\Order\AccountOrderDetailPage
context: Shopware\Core\Framework\Context
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
Available Servicesrepository
config
store
Stoppablefalse

account-order-page-loaded

Nameaccount-order-page-loaded
Since6.4.8.0
ClassShopware\Storefront\Page\Account\Order\AccountOrderPageLoadedHook
DescriptionTriggered when the AccountOrderPage is loaded
Available Datapage: Shopware\Storefront\Page\Account\Order\AccountOrderPage
context: Shopware\Core\Framework\Context
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
Available Servicesrepository
config
store
Stoppablefalse

account-overview-page-loaded

Nameaccount-overview-page-loaded
Since6.4.8.0
ClassShopware\Storefront\Page\Account\Overview\AccountOverviewPageLoadedHook
DescriptionTriggered when the AccountOverviewPage is loaded
Available Datapage: Shopware\Storefront\Page\Account\Overview\AccountOverviewPage
context: Shopware\Core\Framework\Context
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
Available Servicesrepository
config
store
Stoppablefalse

account-payment-method-page-loaded

Nameaccount-payment-method-page-loaded
Since6.4.8.0
ClassShopware\Storefront\Page\Account\PaymentMethod\AccountPaymentMethodPageLoadedHook
DescriptionTriggered when the AccountPaymentMethodPage is loaded
Available Datapage: Shopware\Storefront\Page\Account\PaymentMethod\AccountPaymentMethodPage
context: Shopware\Core\Framework\Context
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
Available Servicesrepository
config
store
Stoppablefalse

account-profile-page-loaded

Nameaccount-profile-page-loaded
Since6.4.8.0
ClassShopware\Storefront\Page\Account\Profile\AccountProfilePageLoadedHook
DescriptionTriggered when the AccountProfilePage is loaded
Available Datapage: Shopware\Storefront\Page\Account\Profile\AccountProfilePage
context: Shopware\Core\Framework\Context
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
Available Servicesrepository
config
store
Stoppablefalse

account-register-page-loaded

Nameaccount-register-page-loaded
Since6.4.8.0
ClassShopware\Storefront\Page\Account\Register\AccountRegisterPageLoadedHook
DescriptionTriggered when the AccountLoginPage is loaded
Available Datapage: Shopware\Storefront\Page\Account\Login\AccountLoginPage
context: Shopware\Core\Framework\Context
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
Available Servicesrepository
config
store
Stoppablefalse

address-detail-page-loaded

Nameaddress-detail-page-loaded
Since6.4.8.0
ClassShopware\Storefront\Page\Address\Detail\AddressDetailPageLoadedHook
DescriptionTriggered when the AddressDetailPage is loaded
Available Datapage: Shopware\Storefront\Page\Address\Detail\AddressDetailPage
context: Shopware\Core\Framework\Context
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
Available Servicesrepository
config
store
Stoppablefalse

address-book-widget-loaded

Nameaddress-book-widget-loaded
Since6.4.8.0
ClassShopware\Storefront\Page\Address\Listing\AddressBookWidgetLoadedHook
DescriptionTriggered when the AddressBookWidget is loaded
Available Datapage: Shopware\Storefront\Page\Address\Listing\AddressListingPage
context: Shopware\Core\Framework\Context
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
Available Servicesrepository
config
store
Stoppablefalse

address-listing-page-loaded

Nameaddress-listing-page-loaded
Since6.4.8.0
ClassShopware\Storefront\Page\Address\Listing\AddressListingPageLoadedHook
DescriptionTriggered when the AddressListingPage is loaded
Available Datapage: Shopware\Storefront\Page\Address\Listing\AddressListingPage
context: Shopware\Core\Framework\Context
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
Available Servicesrepository
config
store
Stoppablefalse

checkout-cart-page-loaded

Namecheckout-cart-page-loaded
Since6.4.8.0
ClassShopware\Storefront\Page\Checkout\Cart\CheckoutCartPageLoadedHook
DescriptionTriggered when the CheckoutCartPage is loaded
Available Datapage: Shopware\Storefront\Page\Checkout\Cart\CheckoutCartPage
context: Shopware\Core\Framework\Context
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
Available Servicesrepository
config
store
Stoppablefalse

checkout-confirm-page-loaded

Namecheckout-confirm-page-loaded
Since6.4.8.0
ClassShopware\Storefront\Page\Checkout\Confirm\CheckoutConfirmPageLoadedHook
DescriptionTriggered when the CheckoutConfirmPage is loaded
Available Datapage: Shopware\Storefront\Page\Checkout\Confirm\CheckoutConfirmPage
context: Shopware\Core\Framework\Context
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
Available Servicesrepository
config
store
Stoppablefalse

checkout-finish-page-loaded

Namecheckout-finish-page-loaded
Since6.4.8.0
ClassShopware\Storefront\Page\Checkout\Finish\CheckoutFinishPageLoadedHook
DescriptionTriggered when the CheckoutFinishPage is loaded
Available Datapage: Shopware\Storefront\Page\Checkout\Finish\CheckoutFinishPage
context: Shopware\Core\Framework\Context
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
Available Servicesrepository
config
store
Stoppablefalse

checkout-info-widget-loaded

Namecheckout-info-widget-loaded
Since6.4.8.0
ClassShopware\Storefront\Page\Checkout\Offcanvas\CheckoutInfoWidgetLoadedHook
DescriptionTriggered when the CheckoutInfoWidget is loaded
Available Datapage: Shopware\Storefront\Page\Checkout\Offcanvas\OffcanvasCartPage
context: Shopware\Core\Framework\Context
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
Available Servicesrepository
config
store
Stoppablefalse

checkout-offcanvas-widget-loaded

Namecheckout-offcanvas-widget-loaded
Since6.4.8.0
ClassShopware\Storefront\Page\Checkout\Offcanvas\CheckoutOffcanvasWidgetLoadedHook
DescriptionTriggered when the CheckoutOffcanvasWidget is loaded
Available Datapage: Shopware\Storefront\Page\Checkout\Offcanvas\OffcanvasCartPage
context: Shopware\Core\Framework\Context
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
Available Servicesrepository
config
store
Stoppablefalse

checkout-register-page-loaded

Namecheckout-register-page-loaded
Since6.4.8.0
ClassShopware\Storefront\Page\Checkout\Register\CheckoutRegisterPageLoadedHook
DescriptionTriggered when the CheckoutRegisterPage is loaded
Available Datapage: Shopware\Storefront\Page\Checkout\Register\CheckoutRegisterPage
context: Shopware\Core\Framework\Context
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
Available Servicesrepository
config
store
Stoppablefalse

cms-page-loaded

Namecms-page-loaded
Since6.4.8.0
ClassShopware\Storefront\Page\Cms\CmsPageLoadedHook
DescriptionTriggered when a CmsPage is loaded
Available Datapage: Shopware\Core\Content\Cms\CmsPageEntity
context: Shopware\Core\Framework\Context
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
Available Servicesrepository
config
store
Stoppablefalse

landing-page-loaded

Namelanding-page-loaded
Since6.4.8.0
ClassShopware\Storefront\Page\LandingPage\LandingPageLoadedHook
DescriptionTriggered when the LandingPage is loaded
Available Datapage: Shopware\Storefront\Page\LandingPage\LandingPage
context: Shopware\Core\Framework\Context
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
Available Servicesrepository
config
store
Stoppablefalse

maintenance-page-loaded

Namemaintenance-page-loaded
Since6.4.8.0
ClassShopware\Storefront\Page\Maintenance\MaintenancePageLoadedHook
DescriptionTriggered when the MaintenancePage is loaded
Available Datapage: Shopware\Storefront\Page\Maintenance\MaintenancePage
context: Shopware\Core\Framework\Context
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
Available Servicesrepository
config
store
Stoppablefalse
Namenavigation-page-loaded
Since6.4.8.0
ClassShopware\Storefront\Page\Navigation\NavigationPageLoadedHook
DescriptionTriggered when the NavigationPage is loaded
Available Datapage: Shopware\Storefront\Page\Navigation\NavigationPage
context: Shopware\Core\Framework\Context
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
Available Servicesrepository
config
store
Stoppablefalse

product-page-loaded

Nameproduct-page-loaded
Since6.4.8.0
ClassShopware\Storefront\Page\Product\ProductPageLoadedHook
DescriptionTriggered when the ProductPage is loaded
Available Datapage: Shopware\Storefront\Page\Product\ProductPage
context: Shopware\Core\Framework\Context
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
Available Servicesrepository
config
store
Stoppablefalse

product-quick-view-widget-loaded

Nameproduct-quick-view-widget-loaded
Since6.4.8.0
ClassShopware\Storefront\Page\Product\QuickView\ProductQuickViewWidgetLoadedHook
DescriptionTriggered when the ProductQuickViewWidget is loaded
Available Datapage: Shopware\Storefront\Page\Product\QuickView\MinimalQuickViewPage
context: Shopware\Core\Framework\Context
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
Available Servicesrepository
config
store
Stoppablefalse

product-reviews-loaded

Nameproduct-reviews-loaded
Since6.4.8.0
ClassShopware\Storefront\Page\Product\Review\ProductReviewsWidgetLoadedHook
DescriptionTriggered when the ProductReviewsWidget is loaded
Available Datareviews: Shopware\Storefront\Page\Product\Review\ReviewLoaderResult
context: Shopware\Core\Framework\Context
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
Available Servicesrepository
config
store
Stoppablefalse

search-page-loaded

Namesearch-page-loaded
Since6.4.8.0
ClassShopware\Storefront\Page\Search\SearchPageLoadedHook
DescriptionTriggered when the SearchPage is loaded
Available Datapage: Shopware\Storefront\Page\Search\SearchPage
context: Shopware\Core\Framework\Context
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
Available Servicesrepository
config
store
Stoppablefalse

search-widget-loaded

Namesearch-widget-loaded
Since6.4.8.0
ClassShopware\Storefront\Page\Search\SearchWidgetLoadedHook
DescriptionTriggered when the SearchWidget is loaded
Available Datapage: Shopware\Storefront\Page\Search\SearchPage
context: Shopware\Core\Framework\Context
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
Available Servicesrepository
config
store
Stoppablefalse

sitemap-page-loaded

Namesitemap-page-loaded
Since6.4.8.0
ClassShopware\Storefront\Page\Sitemap\SitemapPageLoadedHook
DescriptionTriggered when the SitemapPage is loaded
Available Datapage: Shopware\Storefront\Page\Sitemap\SitemapPage
context: Shopware\Core\Framework\Context
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
Available Servicesrepository
config
store
Stoppablefalse

suggest-page-loaded

Namesuggest-page-loaded
Since6.4.8.0
ClassShopware\Storefront\Page\Suggest\SuggestPageLoadedHook
DescriptionTriggered when the SuggestPage is loaded
Available Datapage: Shopware\Storefront\Page\Suggest\SuggestPage
context: Shopware\Core\Framework\Context
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
Available Servicesrepository
config
store
Stoppablefalse

guest-wishlist-page-loaded

Nameguest-wishlist-page-loaded
Since6.4.8.0
ClassShopware\Storefront\Page\Wishlist\GuestWishlistPageLoadedHook
DescriptionTriggered when the GuestWishlistPage is loaded
Available Datapage: Shopware\Storefront\Page\Wishlist\GuestWishlistPage
context: Shopware\Core\Framework\Context
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
Available Servicesrepository
config
store
Stoppablefalse

wishlist-page-loaded

Namewishlist-page-loaded
Since6.4.8.0
ClassShopware\Storefront\Page\Wishlist\WishlistPageLoadedHook
DescriptionTriggered when the WishlistPage is loaded
Available Datapage: Shopware\Storefront\Page\Wishlist\WishlistPage
context: Shopware\Core\Framework\Context
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
Available Servicesrepository
config
store
Stoppablefalse

wishlist-widget-loaded

Namewishlist-widget-loaded
Since6.4.8.0
ClassShopware\Storefront\Page\Wishlist\WishlistWidgetLoadedHook
DescriptionTriggered when the WishlistWidget is loaded
Available Datapage: Shopware\Storefront\Page\Wishlist\WishlistPage
context: Shopware\Core\Framework\Context
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
Available Servicesrepository
config
store
Stoppablefalse
Namemenu-offcanvas-pagelet-loaded
Since6.4.8.0
ClassShopware\Storefront\Pagelet\Menu\Offcanvas\MenuOffcanvasPageletLoadedHook
DescriptionTriggered when the MenuOffcanvasPagelet is loaded
Available Datapage: Shopware\Storefront\Pagelet\Menu\Offcanvas\MenuOffcanvasPagelet
context: Shopware\Core\Framework\Context
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
Available Servicesrepository
config
store
Stoppablefalse

guest-wishlist-pagelet-loaded

Nameguest-wishlist-pagelet-loaded
Since6.4.8.0
ClassShopware\Storefront\Pagelet\Wishlist\GuestWishlistPageletLoadedHook
DescriptionTriggered when the GuestWishlistPagelet is loaded
Available Datapage: Shopware\Storefront\Pagelet\Wishlist\GuestWishlistPagelet
context: Shopware\Core\Framework\Context
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
Available Servicesrepository
config
store
Stoppablefalse

Cart Manipulation

All available Hooks that can be used to manipulate the cart.

cart

Namecart
Since6.4.8.0
ClassShopware\Core\Checkout\Cart\Hook\CartHook
DescriptionTriggered during the cart calculation process.
Available Datacart: Shopware\Core\Checkout\Cart\Cart
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
context: Shopware\Core\Framework\Context
Available Servicescart
config
Stoppablefalse

Custom API endpoint

All available hooks within the Store-API and API

cache-invalidation

Namecache-invalidation
Since6.4.9.0
ClassShopware\Core\Framework\Adapter\Cache\Script\CacheInvalidationHook
DescriptionTriggered whenever an entity is written.
Available Dataevent: Shopware\Core\Framework\Adapter\Cache\Script\Facade\WrittenEventScriptFacade
context: Shopware\Core\Framework\Context
Available Servicescache
Stoppablefalse

api-

Nameapi-
Since6.4.9.0
ClassShopware\Core\Framework\Script\Api\ApiHook
DescriptionTriggered when the api endpoint /api/script/{hook} is called
Available Datarequest: array
name: string
context: Shopware\Core\Framework\Context
isPropagationStopped: bool
scriptResponse: Shopware\Core\Framework\Script\Api\ScriptResponse
Available Servicesrepository
writer
config
response
Stoppabletrue

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
Namecache_key
Since6.4.9.0
Optionaltrue
ClassShopware\Core\Framework\Script\Api\StoreApiCacheKeyHook
DescriptionTriggered 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 Datarequest: array
query: array
salesChannelContext: Shopware\Core\System\SalesChannel\SalesChannelContext
name: string
cacheKey: string
context: Shopware\Core\Framework\Context
isPropagationStopped: bool
Available Services
Stoppabletrue
Function: response
Nameresponse
Since6.4.9.0
Optionalfalse
ClassShopware\Core\Framework\Script\Api\StoreApiResponseHook
DescriptionTriggered 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 Datarequest: 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 Servicesrepository
config
store
writer
response
Stoppabletrue

storefront-

Namestorefront-
Since6.4.9.0
ClassShopware\Storefront\Framework\Script\Api\StorefrontHook
DescriptionTriggered when the Storefront endpoint /storefront/script/{hook} is called
Available Datarequest: 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 Servicesrepository
config
store
writer
response
Stoppabletrue

App Lifecycle

All available hooks that can be used to execute scripts during your app's lifecycle.

app-activated

Nameapp-activated
Since6.4.9.0
ClassShopware\Core\Framework\App\Event\Hooks\AppActivatedHook
DescriptionTriggered when your app is activated.
Available Dataevent: Shopware\Core\Framework\App\Event\AppActivatedEvent
context: Shopware\Core\Framework\Context
Available Servicesrepository
config
writer
Stoppablefalse

app-deactivated

Nameapp-deactivated
Since6.4.9.0
ClassShopware\Core\Framework\App\Event\Hooks\AppDeactivatedHook
DescriptionTriggered when your app is deactivated.
Available Dataevent: Shopware\Core\Framework\App\Event\AppDeactivatedEvent
context: Shopware\Core\Framework\Context
Available Servicesrepository
config
writer
Stoppablefalse

app-deleted

Nameapp-deleted
Since6.4.9.0
ClassShopware\Core\Framework\App\Event\Hooks\AppDeletedHook
DescriptionTriggered when your app is deleted.
Available Dataevent: Shopware\Core\Framework\App\Event\AppDeletedEvent
context: Shopware\Core\Framework\Context
Available Servicesrepository
config
writer
Stoppablefalse

app-installed

Nameapp-installed
Since6.4.9.0
ClassShopware\Core\Framework\App\Event\Hooks\AppInstalledHook
DescriptionTriggered when your app is installed.
Available Dataevent: Shopware\Core\Framework\App\Event\AppInstalledEvent
context: Shopware\Core\Framework\Context
Available Servicesrepository
config
writer
Stoppablefalse

app-updated

Nameapp-updated
Since6.4.9.0
ClassShopware\Core\Framework\App\Event\Hooks\AppUpdatedHook
DescriptionTriggered when your app is updated.
Available Dataevent: Shopware\Core\Framework\App\Event\AppUpdatedEvent
context: Shopware\Core\Framework\Context
Available Servicesrepository
config
writer
Stoppablefalse