docs
docs copied to clipboard
Add `hooks` implementations `example`
Add hooks implementation examples.
| Hook name | is documented | has example |
|---|---|---|
| actionValidateOrder | ✅ | https://github.com/PrestaShop/docs/pull/1543 |
| actionValidateOrderAfter | ✅ | ❌ |
| displayMaintenance | ✅ | ❌ |
| displayCartModalContent | ✅ | ❌ |
| displayCartModalFooter | ✅ | ❌ |
| displayProductPageDrawer | ✅ | ❌ |
| actionPaymentConfirmation | ✅ | ❌ |
| displayPaymentReturn | ✅ | ❌ |
| actionUpdateQuantity | ✅ | ❌ |
| displayRightColumn | ✅ | ❌ |
| displayWrapperTop | ✅ | ❌ |
| displayWrapperBottom | ✅ | ❌ |
| displayContentWrapperTop | ✅ | ❌ |
| displayContentWrapperBottom | ✅ | ❌ |
| displayLeftColumn | ✅ | ❌ |
| displayHome | ✅ | ❌ |
| displayHeader | ✅ | ❌ |
| actionCartSave | ✅ | ❌ |
| actionAuthentication | ✅ | ❌ |
| actionProductAdd | ✅ | ❌ |
| actionProductUpdate | ✅ | ❌ |
| displayAfterTitleTag | ✅ | ❌ |
| displayAfterBodyOpeningTag | ✅ | ❌ |
| displayBanner | ✅ | ❌ |
| displayBeforeBodyClosingTag | ✅ | ❌ |
| displayTop | ✅ | ❌ |
| displayNavFullWidth | ✅ | ❌ |
| displayRightColumnProduct | ✅ | ❌ |
| actionProductDelete | ✅ | ❌ |
| actionObjectProductInCartDeleteBefore | ✅ | ❌ |
| actionObjectProductInCartDeleteAfter | ✅ | ❌ |
| displayFooterProduct | ✅ | ❌ |
| displayInvoice | ✅ | ❌ |
| actionOrderStatusUpdate | ✅ | ❌ |
| displayAdminGridTableBefore | ✅ | ❌ |
| displayAdminGridTableAfter | ✅ | ❌ |
| displayAdminOrder | ✅ | ❌ |
| displayAdminOrderTabOrder | ✅ | ❌ |
| displayAdminOrderTabShip | ✅ | ❌ |
| displayAdminOrderContentOrder | ✅ | ❌ |
| displayAdminOrderContentShip | ✅ | ❌ |
| displayFooter | ✅ | ❌ |
| displayInvoiceLegalFreeText | ✅ | ❌ |
| displayAdminCustomers | ✅ | ❌ |
| displayAdminCustomersAddressesItemAction | ✅ | ❌ |
| displayOrderConfirmation | ✅ | ❌ |
| actionCustomerAccountAdd | ✅ | ❌ |
| actionCustomerAccountUpdate | ✅ | ❌ |
| displayCustomerAccount | ✅ | ❌ |
| actionOrderSlipAdd | ✅ | ❌ |
| displayShoppingCartFooter | ✅ | ❌ |
| displayCustomerAccountForm | ✅ | ❌ |
| displayAdminStatsModules | ✅ | ❌ |
| actionOrderReturn | ✅ | ❌ |
| displayProductAdditionalInfo | ✅ | ❌ |
| actionWatermark | ✅ | ❌ |
| actionProductCancel | ✅ | ❌ |
| displayLeftColumnProduct | ✅ | ❌ |
| actionProductOutOfStock | ✅ | ❌ |
| actionProductAttributeUpdate | ✅ | ❌ |
| displayCarrierList | ✅ | ❌ |
| displayShoppingCart | ✅ | ❌ |
| actionCarrierUpdate | ✅ | ❌ |
| actionOrderStatusPostUpdate | ✅ | ❌ |
| displayCustomerAccountFormTop | ✅ | ❌ |
| displayBackOfficeHeader | ✅ | ❌ |
| displayBackOfficeTop | ✅ | ❌ |
| displayAdminEndContent | ✅ | ❌ |
| displayBackOfficeFooter | ✅ | ❌ |
| actionProductAttributeDelete | ✅ | ❌ |
| actionCarrierProcess | ✅ | ❌ |
| displayBeforeCarrier | ✅ | ❌ |
| displayAfterCarrier | ✅ | ❌ |
| displayOrderDetail | ✅ | ❌ |
| actionPaymentCCAdd | ✅ | ❌ |
| actionCategoryAdd | ✅ | ❌ |
| actionCategoryUpdate | ✅ | ❌ |
| actionCategoryDelete | ✅ | ❌ |
| displayPaymentTop | ✅ | ❌ |
| actionHtaccessCreate | ✅ | ❌ |
| actionAdminMetaSave | ✅ | ❌ |
| displayAttributeGroupForm | ✅ | ❌ |
| actionAttributeGroupSave | ✅ | ❌ |
| actionAttributeGroupDelete | ✅ | ❌ |
| displayFeatureForm | ✅ | ❌ |
| actionFeatureSave | ✅ | ❌ |
| actionFeatureDelete | ✅ | ❌ |
| actionProductSave | ✅ | ❌ |
| displayFeaturePostProcess | ✅ | ❌ |
| displayFeatureValueForm | ✅ | ❌ |
| displayFeatureValuePostProcess | ✅ | ❌ |
| actionFeatureValueDelete | ✅ | ❌ |
| actionFeatureValueSave | ✅ | ❌ |
| displayAttributeForm | ✅ | ❌ |
| actionAttributeDelete | ✅ | ❌ |
| actionAttributeSave | ✅ | ❌ |
| displayMyAccountBlock | ✅ | ❌ |
| actionModuleInstallBefore | ✅ | ❌ |
| actionModuleInstallAfter | ✅ | ❌ |
| displayBackOfficeCategory | ✅ | ❌ |
| displayNav | ✅ | ❌ |
| actionAdminLoginControllerSetMedia | ✅ | ❌ |
| actionOrderEdited | ✅ | ❌ |
| actionEmailAddBeforeContent | ✅ | ❌ |
| actionEmailAddAfterContent | ✅ | ❌ |
| sendMailAlterTemplateVars | ✅ | ❌ |
| displayCartExtraProductActions | ✅ | ❌ |
| displayPaymentByBinaries | ✅ | ❌ |
| additionalCustomerFormFields | ✅ | ❌ |
| additionalCustomerAddressFields | ✅ | ❌ |
| addWebserviceResources | ✅ | ❌ |
| displayCustomerLoginFormAfter | ✅ | ❌ |
| actionClearCache | ✅ | ❌ |
| actionClearCompileCache | ✅ | ❌ |
| actionClearSf2Cache | ✅ | ❌ |
| actionValidateCustomerAddressForm | ✅ | ❌ |
| displayCarrierExtraContent | ✅ | ❌ |
| validateCustomerFormFields | ✅ | ❌ |
| displayProductExtraContent | ✅ | ❌ |
| filterCmsContent | ✅ | ❌ |
| filterCmsCategoryContent | ✅ | ❌ |
| filterProductContent | ✅ | ❌ |
| filterCategoryContent | ✅ | ❌ |
| filterManufacturerContent | ✅ | ❌ |
| filterSupplierContent | ✅ | ❌ |
| filterHtmlContent | ✅ | ❌ |
| displayDashboardTop | ✅ | ❌ |
| actionUpdateLangAfter | ✅ | ❌ |
| actionOutputHTMLBefore | ✅ | ❌ |
| displayAfterProductThumbs | ✅ | ❌ |
| actionDispatcherBefore | ✅ | ❌ |
| actionDispatcherAfter | ✅ | ❌ |
| filterProductSearch | ✅ | ❌ |
| actionProductSearchAfter | ✅ | ❌ |
| actionEmailSendBefore | ✅ | ❌ |
| displayAdminProductsMainStepLeftColumnMiddle | ✅ | ❌ |
| displayAdminProductsMainStepLeftColumnBottom | ✅ | ❌ |
| displayAdminProductsMainStepRightColumnBottom | ✅ | ❌ |
| displayAdminProductsQuantitiesStepBottom | ✅ | ❌ |
| displayAdminProductsPriceStepBottom | ✅ | ❌ |
| displayAdminProductsOptionsStepTop | ✅ | ❌ |
| displayAdminProductsOptionsStepBottom | ✅ | ❌ |
| displayAdminProductsSeoStepBottom | ✅ | ❌ |
| displayAdminProductsShippingStepBottom | ✅ | ❌ |
| displayAdminProductsExtra | ✅ | ❌ |
| displayAdminProductsCombinationBottom | ✅ | ❌ |
| displayDashboardToolbarTopMenu | ✅ | ❌ |
| displayDashboardToolbarIcons | ✅ | ❌ |
| actionFrontControllerInitAfter | ✅ | ❌ |
| actionFrontControllerInitBefore | ✅ | ❌ |
| actionProductFlagsModifier | ✅ | ❌ |
| displayProductActions | ✅ | ❌ |
| displayPersonalInformationTop | ✅ | ❌ |
| displayAdminOrderTop | ✅ | ❌ |
| displayBackOfficeOrderActions | ✅ | ❌ |
| displayAdminOrderSide | ✅ | ❌ |
| displayAdminOrderMain | ✅ | ❌ |
| displayAdminOrderMainBottom | ✅ | ❌ |
| displayAdminOrderTabLink | ✅ | ❌ |
| displayAdminOrderTabContent | ✅ | ❌ |
| actionGetAdminOrderButtons | ✅ | ❌ |
| actionAdminAdminPreferencesControllerPostProcessBefore | ✅ | ❌ |
| displayAdditionalCustomerAddressFields | ✅ | ❌ |
| displayFooterCategory | ✅ | ❌ |
| displayHeaderCategory | ✅ | ❌ |
| actionFrontControllerSetVariables | ✅ | ❌ |
| displayAdminOrderCreateExtraButtons | ✅ | ❌ |
| displayAdminGridTableBefore | ✅ | ❌ |
| displayAdminGridTableAfter | ✅ | ❌ |
| actionAdminOrdersTrackingNumberUpdate | ✅ | ❌ |
| displayBackOfficeEmployeeMenu | ✅ | ❌ |
| actionCustomerLogoutBefore | ✅ | ❌ |
| actionCustomerLogoutAfter | ✅ | ❌ |
| displayCheckoutSummaryTop | ✅ | ❌ |
| actionPresentPaymentOptions | ✅ | ❌ |
| dashboardZoneThree | ✅ | ❌ |
| actionFilterDeliveryOptionList | ✅ | ❌ |
| displayAdminThemesListAfter | ✅ | ❌ |
| actionGetAdminToolbarButtons | ✅ | ❌ |
| displayEmptyModuleCategoryExtraMessage | ✅ | ❌ |
| actionGetAlternativeSearchPanels | ✅ | ❌ |
TODO : Add dynamics hooks :)
We already have:
- an example for
displayLeftColumnandactionFrontControllerSetMediaat https://devdocs.prestashop-project.org/1.7/modules/creation/displaying-content-in-front-office/ - an example for
displayDashboardToolbarIconsat https://devdocs.prestashop-project.org/1.7/modules/concepts/hooks/use-hooks-on-modern-pages/
We already have:
* an example for `displayLeftColumn` and `actionFrontControllerSetMedia` at https://devdocs.prestashop-project.org/1.7/modules/creation/displaying-content-in-front-office/ * an example for `displayDashboardToolbarIcons` at https://devdocs.prestashop-project.org/1.7/modules/concepts/hooks/use-hooks-on-modern-pages/
@leemyongpakvn you can update the issue and add these hooks :)
Hi, i moved your example on the dedicated page : https://github.com/PrestaShop/docs/pull/1586