Hook points

Hooks

Rendering cycle

actionDispatcherBefore serves the cached page (immediate exit if present), recognises signed internal requests (witness customer, personal block analysis) and, for a page to build, turns on personal block tracking; actionOutputHTMLBefore prioritises the main image, minifies, rewrites images and stores the page; displayHeader adds the scripts (dynamic areas, personal blocks, visitor measurement), the instant navigation rules and, in test mode, the badge; the actionAjaxDie<Controller>doProductSearchBefore hooks cache AJAX product lists (filters, sorting, pagination); actionOnImageResizeAfter converts every generated thumbnail to WebP/AVIF.

Invalidation

actionObjectProductAddAfter, actionObjectProductUpdateAfter, actionObjectProductDeleteBefore, actionObjectStockAvailableUpdateAfter, actionCategoryAdd, actionCategoryUpdate, actionCategoryDelete, actionObjectCmsAddAfter, actionObjectCmsUpdateAfter, actionObjectCmsDeleteBefore, actionObjectManufacturerAddAfter, actionObjectManufacturerUpdateAfter, actionObjectManufacturerDeleteBefore, actionObjectSpecificPriceAddAfter, actionObjectSpecificPriceUpdateAfter, actionObjectSpecificPriceDeleteBefore, actionObjectSpecificPriceRuleAddAfter, actionObjectSpecificPriceRuleUpdateAfter, actionObjectSpecificPriceRuleDeleteAfter, actionObjectCartRuleAddAfter, actionObjectCartRuleUpdateAfter, actionObjectCartRuleDeleteBefore, actionObjectCombinationAddAfter, actionObjectCombinationUpdateAfter, actionObjectCombinationDeleteAfter, actionObjectImageAddAfter, actionObjectImageUpdateAfter, actionObjectImageDeleteAfter, actionObjectFeatureUpdateAfter, actionObjectFeatureDeleteAfter, actionObjectFeatureValueUpdateAfter, actionObjectFeatureValueDeleteAfter, actionObjectAttributeGroupUpdateAfter, actionObjectAttributeGroupDeleteAfter, actionObjectProductAttributeUpdateAfter, actionObjectProductAttributeDeleteAfter, actionObjectGroupUpdateAfter, actionObjectGroupDeleteAfter, actionObjectTaxUpdateAfter, actionObjectTaxDeleteAfter, actionObjectTaxRuleAddAfter, actionObjectTaxRuleUpdateAfter, actionObjectTaxRuleDeleteAfter, actionObjectTaxRulesGroupUpdateAfter, actionObjectTaxRulesGroupDeleteAfter, actionObjectCurrencyUpdateAfter, actionObjectCurrencyDeleteAfter, actionObjectShopUrlAddAfter, actionObjectShopUrlUpdateAfter, actionObjectShopUrlDeleteAfter (on PrestaShop 1.7.8: actionObjectAttributeUpdateAfter and actionObjectAttributeDeleteAfter).

Personal blocks

A module declares its personal blocks through the actionFaPcPersonalBlocks hook (list of « hook » or « module:hook »). The Hook::coreCallHook and Hook::coreRenderWidget override only acts while a page meant for the cache is being built; otherwise PrestaShop behaves normally.

Administration

displayAdminAfterHeader is reserved for future back-office notices.

Loading...
Back to top