diff --git a/modules/concepts/hooks/list-of-hooks/actionAfter.md b/modules/concepts/hooks/list-of-hooks/actionAfter.md index 20900ff9ab..3ff9756de6 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionAfter.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/AdminController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' file: classes/controller/AdminController.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionBefore.md b/modules/concepts/hooks/list-of-hooks/actionBefore.md index 2224aafead..0deae94b98 100644 --- a/modules/concepts/hooks/list-of-hooks/actionBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/AdminController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' file: classes/controller/AdminController.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionFormModifier.md b/modules/concepts/hooks/list-of-hooks/actionFormModifier.md index 7fae447e97..e763b72b3a 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFormModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionFormModifier.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/AdminController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' file: classes/controller/AdminController.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionListingFieldsModifier.md b/modules/concepts/hooks/list-of-hooks/actionListingFieldsModifier.md index 42cfb8b657..9ea06ce653 100644 --- a/modules/concepts/hooks/list-of-hooks/actionListingFieldsModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionListingFieldsModifier.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/AdminController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' file: classes/controller/AdminController.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionListingResultsModifier.md b/modules/concepts/hooks/list-of-hooks/actionListingResultsModifier.md index 1590ac25ba..face7eadd2 100644 --- a/modules/concepts/hooks/list-of-hooks/actionListingResultsModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionListingResultsModifier.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/AdminController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' file: classes/controller/AdminController.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionOptionsModifier.md b/modules/concepts/hooks/list-of-hooks/actionOptionsModifier.md index 904817330b..9e7ddd8d0e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOptionsModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionOptionsModifier.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/AdminController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' file: classes/controller/AdminController.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionGridDataModifier.md b/modules/concepts/hooks/list-of-hooks/actionGridDataModifier.md index 392147524c..db063a20dc 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGridDataModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionGridDataModifier.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Core/Grid/GridFactory.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Core/Grid/GridFactory.php' file: src/Core/Grid/GridFactory.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionGridDefinitionModifier.md b/modules/concepts/hooks/list-of-hooks/actionGridDefinitionModifier.md index ff1c8e14ef..b9d5fcd6b0 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGridDefinitionModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionGridDefinitionModifier.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Core/Grid/Definition/Factory/AbstractGridDefinitionFactory.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Core/Grid/Definition/Factory/AbstractGridDefinitionFactory.php' file: src/Core/Grid/Definition/Factory/AbstractGridDefinitionFactory.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionGridFilterFormModifier.md b/modules/concepts/hooks/list-of-hooks/actionGridFilterFormModifier.md index 0e948b1ac5..19bd5a5d70 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGridFilterFormModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionGridFilterFormModifier.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Core/Grid/Filter/GridFilterFormFactory.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Core/Grid/Filter/GridFilterFormFactory.php' file: src/Core/Grid/Filter/GridFilterFormFactory.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionGridPresenterModifier.md b/modules/concepts/hooks/list-of-hooks/actionGridPresenterModifier.md index 71751e4664..e987e62fe6 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGridPresenterModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionGridPresenterModifier.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Core/Grid/Presenter/GridPresenter.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Core/Grid/Presenter/GridPresenter.php' file: src/Core/Grid/Presenter/GridPresenter.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionGridQueryBuilderModifier.md b/modules/concepts/hooks/list-of-hooks/actionGridQueryBuilderModifier.md index 94b0fe8916..af92bdaacf 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGridQueryBuilderModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionGridQueryBuilderModifier.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Core/Grid/Data/Factory/DoctrineGridDataFactory.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Core/Grid/Data/Factory/DoctrineGridDataFactory.php' file: src/Core/Grid/Data/Factory/DoctrineGridDataFactory.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionFormBuilderModifier.md b/modules/concepts/hooks/list-of-hooks/actionFormBuilderModifier.md index fe2b83ffbe..b02c198c13 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFormBuilderModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionFormBuilderModifier.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Core/Form/IdentifiableObject/Builder/FormBuilder.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Core/Form/IdentifiableObject/Builder/FormBuilder.php' file: src/Core/Form/IdentifiableObject/Builder/FormBuilder.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionFormDataProviderData.md b/modules/concepts/hooks/list-of-hooks/actionFormDataProviderData.md index 2f29280d22..8418a66c88 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFormDataProviderData.md +++ b/modules/concepts/hooks/list-of-hooks/actionFormDataProviderData.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Core/Form/IdentifiableObject/Builder/FormBuilder.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Core/Form/IdentifiableObject/Builder/FormBuilder.php' file: src/Core/Form/IdentifiableObject/Builder/FormBuilder.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionFormDataProviderDefaultData.md b/modules/concepts/hooks/list-of-hooks/actionFormDataProviderDefaultData.md index 184717556e..ec144eaad0 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFormDataProviderDefaultData.md +++ b/modules/concepts/hooks/list-of-hooks/actionFormDataProviderDefaultData.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Core/Form/IdentifiableObject/Builder/FormBuilder.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Core/Form/IdentifiableObject/Builder/FormBuilder.php' file: src/Core/Form/IdentifiableObject/Builder/FormBuilder.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionListingFieldsModifier.md b/modules/concepts/hooks/list-of-hooks/actionListingFieldsModifier.md index d8fde6b0f0..6a43ac9363 100644 --- a/modules/concepts/hooks/list-of-hooks/actionListingFieldsModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionListingFieldsModifier.md @@ -4,10 +4,10 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Bridge/Helper/Listing/HelperBridge/HelperListBridge.php' - file: src/PrestaShopBundle/Bridge/Helper/Listing/HelperBridge/HelperListBridge.php + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' + file: classes/controller/AdminController.php locations: - - 'front office' + - 'back office' type: action hookAliases: array_return: false @@ -23,13 +23,7 @@ description: '' ## Call of the Hook in the origin file ```php -dispatchWithParameters('action' . $helperListConfiguration->legacyControllerName . 'ListingFieldsModifier', [ - 'select' => &$helperListConfiguration->select, - 'join' => &$helperListConfiguration->join, - 'where' => &$helperListConfiguration->where, - 'group_by' => &$helperListConfiguration->group, - 'order_by' => &$helperListConfiguration->orderBy, - 'order_way' => &$helperListConfiguration->orderWay, - 'fields' => &$helperListConfiguration->fieldsList, +Hook::exec('action' . $this->controller_name . 'ListingFieldsModifier', [ + 'fields' => &$this->fields_list, ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionListingResultsModifier.md b/modules/concepts/hooks/list-of-hooks/actionListingResultsModifier.md index f1ff6b6b73..e43800488b 100644 --- a/modules/concepts/hooks/list-of-hooks/actionListingResultsModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionListingResultsModifier.md @@ -4,10 +4,10 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Bridge/Helper/Listing/HelperBridge/HelperListBridge.php' - file: src/PrestaShopBundle/Bridge/Helper/Listing/HelperBridge/HelperListBridge.php + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' + file: classes/controller/AdminController.php locations: - - 'front office' + - 'back office' type: action hookAliases: array_return: false @@ -23,8 +23,8 @@ description: '' ## Call of the Hook in the origin file ```php -dispatchWithParameters('action' . $helperListConfiguration->legacyControllerName . 'ListingResultsModifier', [ - 'list' => &$helperListConfiguration->list, - 'list_total' => &$helperListConfiguration->listTotal, +Hook::exec('action' . $this->controller_name . 'ListingResultsModifier', [ + 'list' => &$this->_list, + 'list_total' => &$this->_listTotal, ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminAfter.md b/modules/concepts/hooks/list-of-hooks/actionAdminAfter.md index 46e617475e..5dd54aca38 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminAfter.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/AdminController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' file: classes/controller/AdminController.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminBefore.md index d645e4c593..5fb86a7fcb 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/AdminController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' file: classes/controller/AdminController.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminAdminShopParametersMetaControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminAdminShopParametersMetaControllerPostProcessBefore.md index 0091858bfe..dbff1b27c3 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminAdminShopParametersMetaControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminAdminShopParametersMetaControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'On post-process in Admin Configure Shop Parameters Meta Controller' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/MetaController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/MetaController.php' file: src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/MetaController.php locations: - 'back office' @@ -23,5 +23,10 @@ description: 'This hook is called on Admin Configure Shop Parameters Meta post-p ## Call of the Hook in the origin file ```php -dispatchHook('actionAdminAdminShopParametersMetaControllerPostProcessBefore', ['controller' => $this]) +$this->dispatchHookWithParameters('actionAdminAdminShopParametersMetaControllerPostProcessBefore', ['controller' => $this]); + + $form = $formHandler->getForm(); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminAdminWebserviceControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminAdminWebserviceControllerPostProcessBefore.md index f3c8b767f2..d7cc02726f 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminAdminWebserviceControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminAdminWebserviceControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/WebserviceController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/WebserviceController.php' file: src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/WebserviceController.php locations: - 'back office' @@ -23,5 +23,10 @@ description: '' ## Call of the Hook in the origin file ```php -dispatchHook('actionAdminAdminWebserviceControllerPostProcessBefore', ['controller' => $this]) +$this->dispatchHookWithParameters('actionAdminAdminWebserviceControllerPostProcessBefore', ['controller' => $this]); + + $form = $formHandler->getForm(); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminAdministrationControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminAdministrationControllerPostProcessBefore.md index 97179e60dd..d6eb47595a 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminAdministrationControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminAdministrationControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/AdministrationController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/AdministrationController.php' file: src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/AdministrationController.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminAdministrationControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminAdministrationControllerPostProcessBefore.md index d8f08c9ae3..a0f365ac00 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminAdministrationControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminAdministrationControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'On post-process in Admin Configure Advanced Parameters Administration Controller' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/AdministrationController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/AdministrationController.php' file: src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/AdministrationController.php locations: - 'back office' @@ -23,5 +23,10 @@ description: 'This hook is called on Admin Configure Advanced Parameters Adminis ## Call of the Hook in the origin file ```php -dispatchHook('actionAdminAdministrationControllerPostProcessBefore', ['controller' => $this]) +$this->dispatchHookWithParameters('actionAdminAdministrationControllerPostProcessBefore', ['controller' => $this]); + + $form = $formHandler->getForm(); + $form->handleRequest($request); + + if ($form->isSubmitted()) { ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminAdvancedParametersPerformanceControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminAdvancedParametersPerformanceControllerPostProcessBefore.md index 8ea489393b..df598df21c 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminAdvancedParametersPerformanceControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminAdvancedParametersPerformanceControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/PerformanceController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/PerformanceController.php' file: src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/PerformanceController.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminAdvancedParametersPerformanceControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminAdvancedParametersPerformanceControllerPostProcessBefore.md index a36bf36efd..cf3e24bd6f 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminAdvancedParametersPerformanceControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminAdvancedParametersPerformanceControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'On post-process in Admin Configure Advanced Parameters Performance Controller' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/PerformanceController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/PerformanceController.php' file: src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/PerformanceController.php locations: - 'back office' @@ -23,5 +23,10 @@ description: 'This hook is called on Admin Configure Advanced Parameters Perform ## Call of the Hook in the origin file ```php -dispatchHook('actionAdminAdvancedParametersPerformanceControllerPostProcessBefore', ['controller' => $this]) +$this->dispatchHookWithParameters('actionAdminAdvancedParametersPerformanceControllerPostProcessBefore', ['controller' => $this]); + + $form = $formHandler->getForm(); + $form->handleRequest($request); + + if ($form->isSubmitted()) { ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminBreadcrumbModifier.md b/modules/concepts/hooks/list-of-hooks/actionAdminBreadcrumbModifier.md index 0bc5b401d5..1412b45c9c 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminBreadcrumbModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminBreadcrumbModifier.md @@ -4,7 +4,10 @@ hidden: true hookTitle: 'Modify back office breadcrumb' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/src/PrestaShopBundle/Twig/Component/Toolbar.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' + file: classes/controller/AdminController.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Twig/Component/Toolbar.php' file: src/PrestaShopBundle/Twig/Component/Toolbar.php locations: - 'back office' @@ -23,5 +26,5 @@ description: 'This hook allows modifying back office breadcrumb' ## Call of the Hook in the origin file ```php -$this->hookDispatcher->dispatchWithParameters('actionAdminBreadcrumbModifier', ['tabs' => $tabs, 'breadcrumb' => &$this->breadcrumbs]); +Hook::exec('actionAdminBreadcrumbModifier', ['tabs' => $tabs, 'breadcrumb' => &$breadcrumbs2], null, true) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminControllerInitAfter.md b/modules/concepts/hooks/list-of-hooks/actionAdminControllerInitAfter.md index a6575db621..0423d17259 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminControllerInitAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminControllerInitAfter.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Perform actions after admin controller initialization' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/AdminController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' file: classes/controller/AdminController.php locations: - 'back office' @@ -23,10 +23,10 @@ description: 'This hook is launched after the initialization of all admin contro ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionAdminControllerInitAfter', +'actionAdminControllerInitAfter', [ 'controller' => $this, ] - ) + ); + } ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminControllerInitBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminControllerInitBefore.md index 7722887d45..5e55f03cee 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminControllerInitBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminControllerInitBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Perform actions before admin controller initialization' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/AdminController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' file: classes/controller/AdminController.php locations: - 'back office' @@ -23,10 +23,10 @@ description: 'This hook is launched before the initialization of all admin contr ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionAdminControllerInitBefore', +'actionAdminControllerInitBefore', [ 'controller' => $this, ] - ) + ); + parent::init(); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminControllerSetMedia.md b/modules/concepts/hooks/list-of-hooks/actionAdminControllerSetMedia.md index 715736c42f..26016b1eac 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminControllerSetMedia.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminControllerSetMedia.md @@ -1,11 +1,14 @@ --- Title: actionAdminControllerSetMedia hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Bridge/AdminController/LegacyControllerBridge.php' - file: src/PrestaShopBundle/Bridge/AdminController/LegacyControllerBridge.php + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' + file: classes/controller/AdminController.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Twig/Component/HeadTag.php' + file: src/PrestaShopBundle/Twig/Component/HeadTag.php locations: - 'back office' type: action @@ -24,9 +27,15 @@ description: '' ## Call of the Hook in the origin file ```php -dispatchWithParameters('actionAdminControllerSetMedia') +Hook::exec('actionAdminControllerSetMedia') ``` ## Example implementation +This hook has been implemented as an example in our +[modules examples repository - demoextendgrid](https://github.com/PrestaShop/example-modules/tree/master/demoextendgrid). -This hook has been implemented as an example in our [modules examples repository - demoextendgrid](https://github.com/PrestaShop/example-modules/tree/master/demoextendgrid). +{{% callout type="warning" %}} +In PrestaShop 9, this hook is dispatched from a Twig component. +The methods `addJqueryPlugin()` and `addJqueryUI()` may not be available +on migrated Symfony pages. Use `addJS()` and `addCSS()` instead. +{{% /callout %}} \ No newline at end of file diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminDuplicateAfter.md b/modules/concepts/hooks/list-of-hooks/actionAdminDuplicateAfter.md index 84e745a244..cfcc522105 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminDuplicateAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminDuplicateAfter.md @@ -1,10 +1,10 @@ --- Title: actionAdminDuplicateAfter hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/src/Adapter/Product/Update/ProductDuplicator.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Product/Update/ProductDuplicator.php' file: src/Adapter/Product/Update/ProductDuplicator.php locations: - 'back office' @@ -23,8 +23,10 @@ description: '' ## Call of the Hook in the origin file ```php -$this->hookDispatcher->dispatchWithParameters( - 'actionAdminDuplicateAfter', - ['id_product' => $oldProductId, 'id_product_new' => $newProductId] -); +'actionAdminDuplicateAfter', + ['id_product' => $oldProductId, 'id_product_new' => $newProductId] + ); + + // @todo: after ##21740 (transactions PR) is resolved. + // Based on if its accepted or not, we need to implement roll back if something went wrong. ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminDuplicateBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminDuplicateBefore.md index e7735ce449..2840e6d693 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminDuplicateBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminDuplicateBefore.md @@ -1,10 +1,10 @@ --- Title: actionAdminDuplicateBefore hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/src/Adapter/Product/Update/ProductDuplicator.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Product/Update/ProductDuplicator.php' file: src/Adapter/Product/Update/ProductDuplicator.php locations: - 'back office' @@ -23,8 +23,9 @@ description: '' ## Call of the Hook in the origin file ```php -$this->hookDispatcher->dispatchWithParameters( - 'actionAdminDuplicateBefore', - ['id_product' => $oldProductId] -); +'actionAdminDuplicateBefore', + ['id_product' => $oldProductId] + ); + $newProduct = $this->duplicateProduct($productId, $shopConstraint); + $newProductId = (int) $newProduct->id; ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminInternationalGeolocationControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminInternationalGeolocationControllerPostProcessBefore.md index d147a07402..15ca85fdb0 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminInternationalGeolocationControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminInternationalGeolocationControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Improve/International/GeolocationController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Improve/International/GeolocationController.php' file: src/PrestaShopBundle/Controller/Admin/Improve/International/GeolocationController.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminInternationalGeolocationControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminInternationalGeolocationControllerPostProcessBefore.md index 01d3860915..fe7b5cd8c0 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminInternationalGeolocationControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminInternationalGeolocationControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'On post-process in Admin Improve International Geolocation Controller' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Improve/International/GeolocationController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Improve/International/GeolocationController.php' file: src/PrestaShopBundle/Controller/Admin/Improve/International/GeolocationController.php locations: - 'back office' @@ -23,5 +23,10 @@ description: 'This hook is called on Admin Improve International Geolocation pos ## Call of the Hook in the origin file ```php -dispatchHook('actionAdminInternationalGeolocationControllerPostProcessBefore', ['controller' => $this]) +$this->dispatchHookWithParameters('actionAdminInternationalGeolocationControllerPostProcessBefore', ['controller' => $this]); + + $form = $formHandler->getForm(); + $form->handleRequest($request); + + if ($form->isSubmitted()) { ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminInternationalLocalizationControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminInternationalLocalizationControllerPostProcessBefore.md index bf0c3f7298..300f353a9e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminInternationalLocalizationControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminInternationalLocalizationControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Improve/International/LocalizationController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Improve/International/LocalizationController.php' file: src/PrestaShopBundle/Controller/Admin/Improve/International/LocalizationController.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminInternationalLocalizationControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminInternationalLocalizationControllerPostProcessBefore.md index a6a095045b..146b47dbeb 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminInternationalLocalizationControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminInternationalLocalizationControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'On post-process in Admin Improve International Localization Controller' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Improve/International/LocalizationController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Improve/International/LocalizationController.php' file: src/PrestaShopBundle/Controller/Admin/Improve/International/LocalizationController.php locations: - 'back office' @@ -23,5 +23,10 @@ description: 'This hook is called on Admin Improve International Localization po ## Call of the Hook in the origin file ```php -dispatchHook('actionAdminInternationalLocalizationControllerPostProcessBefore', ['controller' => $this]) +$this->dispatchHookWithParameters('actionAdminInternationalLocalizationControllerPostProcessBefore', ['controller' => $this]); + + $form = $formHandler->getForm(); + $form->handleRequest($request); + + if ($form->isSubmitted()) { ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminLoginControllerSetMedia.md b/modules/concepts/hooks/list-of-hooks/actionAdminLoginControllerSetMedia.md index 43be5bcf98..4d0ee0dca4 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminLoginControllerSetMedia.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminLoginControllerSetMedia.md @@ -4,8 +4,8 @@ hidden: true hookTitle: 'Set media on admin login page header' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/admin/AdminLoginController.php' - file: controllers/admin/AdminLoginController.php + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Twig/Component/Login/LoginHeadTag.php' + file: src/PrestaShopBundle/Twig/Component/Login/LoginHeadTag.php locations: - 'back office' type: action @@ -23,10 +23,10 @@ description: 'This hook is called after adding media to admin login page header' ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionAdminLoginControllerSetMedia', +'actionAdminLoginControllerSetMedia', [ - 'controller' => $this, + 'controller' => $this->legacyControllerContext, ] - ) + ); + } ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminLogsControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminLogsControllerPostProcessBefore.md index beb65c9644..a239c8b01f 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminLogsControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminLogsControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/LogsController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/LogsController.php' file: src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/LogsController.php locations: - 'back office' @@ -23,5 +23,10 @@ description: '' ## Call of the Hook in the origin file ```php -dispatchHook('actionAdminLogsControllerPostProcessBefore', ['controller' => $this]) +$this->dispatchHookWithParameters('actionAdminLogsControllerPostProcessBefore', ['controller' => $this]); + + return $this->buildSearchResponse( + $definitionFactory, + $request, + LogGridDefinitionFactory::GRID_ID, ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminMaintenanceControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminMaintenanceControllerPostProcessBefore.md index 549ab18a65..f4f4f2e0f1 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminMaintenanceControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminMaintenanceControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/MaintenanceController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/MaintenanceController.php' file: src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/MaintenanceController.php locations: - 'back office' @@ -23,5 +23,10 @@ description: '' ## Call of the Hook in the origin file ```php -dispatchHook('actionAdminMaintenanceControllerPostProcessBefore', ['controller' => $this]) +$this->dispatchHookWithParameters('actionAdminMaintenanceControllerPostProcessBefore', ['controller' => $this]); + $form = $maintenanceFormHandler->getForm(); + $form->handleRequest($request); + + if (!$form->isSubmitted()) { + return $redirectResponse; ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminMenuTabsModifier.md b/modules/concepts/hooks/list-of-hooks/actionAdminMenuTabsModifier.md index 085542232a..42587789a2 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminMenuTabsModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminMenuTabsModifier.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Modify back office menu' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/classes/controller/AdminController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' file: classes/controller/AdminController.php locations: - 'back office' @@ -23,5 +23,5 @@ description: 'This hook allows modifying back office menu tabs' ## Call of the Hook in the origin file ```php -Hook::exec('actionAdminMenuTabsModifier', ['tabs' => &$tabs], null, true); +Hook::exec('actionAdminMenuTabsModifier', ['tabs' => &$tabs], null, true) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminMetaAfterWriteRobotsFile.md b/modules/concepts/hooks/list-of-hooks/actionAdminMetaAfterWriteRobotsFile.md index 6aee19c05b..58bd761d56 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminMetaAfterWriteRobotsFile.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminMetaAfterWriteRobotsFile.md @@ -1,10 +1,10 @@ --- Title: actionAdminMetaAfterWriteRobotsFile hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Tools.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Tools.php' file: classes/Tools.php locations: - 'back office' @@ -33,8 +33,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionAdminMetaAfterWriteRobotsFile', [ - 'rb_data' => $robots_content, - 'write_fd' => &$write_fd, - ]) +Hook::exec('actionAdminMetaAfterWriteRobotsFile', [ 'rb_data' => $robots_content, 'write_fd' => &$write_fd, ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminMetaBeforeWriteRobotsFile.md b/modules/concepts/hooks/list-of-hooks/actionAdminMetaBeforeWriteRobotsFile.md index 0abaedbd58..79eb1d88af 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminMetaBeforeWriteRobotsFile.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminMetaBeforeWriteRobotsFile.md @@ -1,10 +1,10 @@ --- Title: actionAdminMetaBeforeWriteRobotsFile hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Tools.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Tools.php' file: classes/Tools.php locations: - 'back office' @@ -32,7 +32,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionAdminMetaBeforeWriteRobotsFile', [ - 'rb_data' => &$robots_content, - ]) +Hook::exec('actionAdminMetaBeforeWriteRobotsFile', [ 'rb_data' => &$robots_content, ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminMetaSave.md b/modules/concepts/hooks/list-of-hooks/actionAdminMetaSave.md index faf0cfd53a..c0ad0564ca 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminMetaSave.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminMetaSave.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'After saving the configuration in AdminMeta' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Meta/CommandHandler/AddMetaHandler.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Meta/CommandHandler/AddMetaHandler.php' file: src/Adapter/Meta/CommandHandler/AddMetaHandler.php locations: - 'back office' @@ -24,5 +24,5 @@ description: 'This hook is displayed after saving the configuration in AdminMeta ## Call of the Hook in the origin file ```php -dispatchWithParameters('actionAdminMetaSave') +$this->hookDispatcher->dispatchWithParameters('actionAdminMetaSave') ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminOrdersTrackingNumberUpdate.md b/modules/concepts/hooks/list-of-hooks/actionAdminOrdersTrackingNumberUpdate.md index fcfb0f5873..a84bc91d61 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminOrdersTrackingNumberUpdate.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminOrdersTrackingNumberUpdate.md @@ -4,14 +4,14 @@ hidden: true hookTitle: 'After setting the tracking number for the order' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Order/CommandHandler/UpdateOrderShippingDetailsHandler.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Order/CommandHandler/UpdateOrderShippingDetailsHandler.php' file: src/Adapter/Order/CommandHandler/UpdateOrderShippingDetailsHandler.php locations: - 'back office' type: action hookAliases: array_return: false -check_exceptions: false +check_exceptions: true chain: false origin: core description: 'This hook allows you to execute code after the unique tracking number for the order was added' @@ -34,9 +34,5 @@ description: 'This hook allows you to execute code after the unique tracking num ## Call of the Hook in the origin file ```php -Hook::exec('actionAdminOrdersTrackingNumberUpdate', [ - 'order' => $order, - 'customer' => $customer, - 'carrier' => $carrier, - ], null, false, true, false, $order->id_shop) +Hook::exec('actionAdminOrdersTrackingNumberUpdate', [ 'order' => $order, 'customer' => $customer, 'carrier' => $carrier, ], null, false, true, false, $order->id_shop) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminPreferencesControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminPreferencesControllerPostProcessBefore.md index 4fce450a74..2fb84ee486 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminPreferencesControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminPreferencesControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/PreferencesController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/PreferencesController.php' file: src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/PreferencesController.php locations: - 'back office' @@ -23,5 +23,10 @@ description: '' ## Call of the Hook in the origin file ```php -dispatchHook('actionAdminPreferencesControllerPostProcessBefore', ['controller' => $this]) +$this->dispatchHookWithParameters('actionAdminPreferencesControllerPostProcessBefore', ['controller' => $this]); + + $form = $preferencesFormHandler->getForm(); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminProductsListingFieldsModifier.md b/modules/concepts/hooks/list-of-hooks/actionAdminProductsListingFieldsModifier.md index 34016c9b65..c536f5fe4b 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminProductsListingFieldsModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminProductsListingFieldsModifier.md @@ -4,8 +4,8 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Product/AdminProductDataProvider.php' - file: src/Adapter/Product/AdminProductDataProvider.php + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' + file: classes/controller/AdminController.php locations: - 'back office' type: action @@ -37,13 +37,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionAdminProductsListingFieldsModifier', [ - '_ps_version' => AppKernel::VERSION, - 'sql_select' => &$sqlSelect, - 'sql_table' => &$sqlTable, - 'sql_where' => &$sqlWhere, - 'sql_group_by' => &$sqlGroupBy, - 'sql_order' => &$sqlOrder, - 'sql_limit' => &$sqlLimit, - ]) +Hook::exec('action' . $this->controller_name . 'ListingFieldsModifier', [ 'fields' => &$this->fields_list, ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminProductsListingResultsModifier.md b/modules/concepts/hooks/list-of-hooks/actionAdminProductsListingResultsModifier.md index b2ede53889..b9d2fd16f9 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminProductsListingResultsModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminProductsListingResultsModifier.md @@ -4,8 +4,8 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Product/AdminProductDataProvider.php' - file: src/Adapter/Product/AdminProductDataProvider.php + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' + file: classes/controller/AdminController.php locations: - 'back office' type: action @@ -34,9 +34,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionAdminProductsListingResultsModifier', [ - '_ps_version' => AppKernel::VERSION, - 'products' => &$products, - 'total' => $total, - ]) +Hook::exec('action' . $this->controller_name . 'ListingResultsModifier', [ 'list' => &$this->_list, 'list_total' => &$this->_listTotal, ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminSecurityControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminSecurityControllerPostProcessBefore.md index 855f79423a..c401aa14ee 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminSecurityControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminSecurityControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'On post-process in Admin Security Controller' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/SecurityController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/SecurityController.php' file: src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/SecurityController.php locations: - 'back office' @@ -23,5 +23,10 @@ description: 'This hook is called on Admin Security Controller post-process befo ## Call of the Hook in the origin file ```php -dispatchHook('actionAdminSecurityControllerPostProcessBefore', ['controller' => $this]) +$this->dispatchHookWithParameters('actionAdminSecurityControllerPostProcessBefore', ['controller' => $this]); + + $form = $formHandler->getForm(); + $form->handleRequest($request); + + if ($form->isSubmitted()) { ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminShippingPreferencesControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminShippingPreferencesControllerPostProcessBefore.md index 9691f100cf..95caf71746 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminShippingPreferencesControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminShippingPreferencesControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'On post-process in Admin Improve Shipping Preferences Controller' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Improve/Shipping/PreferencesController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Improve/Shipping/PreferencesController.php' file: src/PrestaShopBundle/Controller/Admin/Improve/Shipping/PreferencesController.php locations: - 'back office' @@ -23,5 +23,10 @@ description: 'This hook is called on Admin Improve Shipping Preferences post-pro ## Call of the Hook in the origin file ```php -dispatchHook('actionAdminShippingPreferencesControllerPostProcessBefore', ['controller' => $this]) +'actionAdminShippingPreferencesControllerPostProcessBefore', + ['controller' => $this] + ); + + $form = $carrierOptionsFormHandler->getForm(); + $form->handleRequest($request); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminShippingPreferencesControllerPostProcessCarrierOptionsBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminShippingPreferencesControllerPostProcessCarrierOptionsBefore.md index 43f56661c4..e6b4f780ad 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminShippingPreferencesControllerPostProcessCarrierOptionsBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminShippingPreferencesControllerPostProcessCarrierOptionsBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'On post-process in Admin Improve Shipping Preferences Controller' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Improve/Shipping/PreferencesController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Improve/Shipping/PreferencesController.php' file: src/PrestaShopBundle/Controller/Admin/Improve/Shipping/PreferencesController.php locations: - 'back office' @@ -23,8 +23,10 @@ description: 'This hook is called on Admin Improve Shipping Preferences post-pro ## Call of the Hook in the origin file ```php -dispatchHook( - 'actionAdminShippingPreferencesControllerPostProcessCarrierOptionsBefore', - ['controller' => $this] - ) +'actionAdminShippingPreferencesControllerPostProcessCarrierOptionsBefore', + ['controller' => $this] + ); + + $this->dispatchHookWithParameters( + 'actionAdminShippingPreferencesControllerPostProcessBefore', ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminShippingPreferencesControllerPostProcessHandlingBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminShippingPreferencesControllerPostProcessHandlingBefore.md index e64ca90087..3f7af36861 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminShippingPreferencesControllerPostProcessHandlingBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminShippingPreferencesControllerPostProcessHandlingBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'On post-process in Admin Improve Shipping Preferences Controller' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Improve/Shipping/PreferencesController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Improve/Shipping/PreferencesController.php' file: src/PrestaShopBundle/Controller/Admin/Improve/Shipping/PreferencesController.php locations: - 'back office' @@ -23,8 +23,10 @@ description: 'This hook is called on Admin Improve Shipping Preferences post-pro ## Call of the Hook in the origin file ```php -dispatchHook( - 'actionAdminShippingPreferencesControllerPostProcessHandlingBefore', +'actionAdminShippingPreferencesControllerPostProcessHandlingBefore', ['controller' => $this] - ) + ); + + $this->dispatchHookWithParameters( + 'actionAdminShippingPreferencesControllerPostProcessBefore', ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersMetaControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersMetaControllerPostProcessBefore.md index 7ec255f1bb..383707d7d5 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersMetaControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersMetaControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/MetaController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/MetaController.php' file: src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/MetaController.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersOrderPreferencesControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersOrderPreferencesControllerPostProcessBefore.md index bf1b26515e..73ad72d3c7 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersOrderPreferencesControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersOrderPreferencesControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/OrderPreferencesController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/OrderPreferencesController.php' file: src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/OrderPreferencesController.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersOrderPreferencesControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersOrderPreferencesControllerPostProcessBefore.md index 1f686e1525..7189179fae 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersOrderPreferencesControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersOrderPreferencesControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'On post-process in Admin Configure Shop Parameters Order Preferences Controller' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/OrderPreferencesController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/OrderPreferencesController.php' file: src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/OrderPreferencesController.php locations: - 'back office' @@ -23,5 +23,10 @@ description: 'This hook is called on Admin Configure Shop Parameters Order Prefe ## Call of the Hook in the origin file ```php -dispatchHook('actionAdminShopParametersOrderPreferencesControllerPostProcessBefore', ['controller' => $this]) +$this->dispatchHookWithParameters('actionAdminShopParametersOrderPreferencesControllerPostProcessBefore', ['controller' => $this]); + + $form = $formHandler->getForm(); + $form->handleRequest($request); + + if ($form->isSubmitted()) { ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersProductPreferencesControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersProductPreferencesControllerPostProcessBefore.md index 77d2fbc4c6..a369e1fdad 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersProductPreferencesControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersProductPreferencesControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/ProductPreferencesController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/ProductPreferencesController.php' file: src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/ProductPreferencesController.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersProductPreferencesControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersProductPreferencesControllerPostProcessBefore.md index b0222b9133..4cd74ef864 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersProductPreferencesControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersProductPreferencesControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/ProductPreferencesController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/ProductPreferencesController.php' file: src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/ProductPreferencesController.php locations: - 'back office' @@ -23,5 +23,10 @@ description: '' ## Call of the Hook in the origin file ```php -dispatchHook('actionAdminShopParametersProductPreferencesControllerPostProcessBefore', ['controller' => $this]) +$this->dispatchHookWithParameters('actionAdminShopParametersProductPreferencesControllerPostProcessBefore', ['controller' => $this]); + + $form = $formHandler->getForm(); + $form->handleRequest($request); + + if ($form->isSubmitted()) { ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminThemesControllerUpdate_optionsAfter.md b/modules/concepts/hooks/list-of-hooks/actionAdminThemesControllerUpdate_optionsAfter.md index 6472575752..9d8324168d 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminThemesControllerUpdate_optionsAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminThemesControllerUpdate_optionsAfter.md @@ -4,7 +4,7 @@ hidden: true hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/src/Adapter/Shop/CommandHandler/UploadLogosHandler.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Shop/CommandHandler/UploadLogosHandler.php' file: src/Adapter/Shop/CommandHandler/UploadLogosHandler.php locations: - 'back office' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -$this->hookDispatcher->dispatchWithParameters('actionAdminThemesControllerUpdate_optionsAfter'); +$this->hookDispatcher->dispatchWithParameters('actionAdminThemesControllerUpdate_optionsAfter') ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminThemesControllerUpdateoptionsAfter.md b/modules/concepts/hooks/list-of-hooks/actionAdminThemesControllerUpdateoptionsAfter.md index 4113988c27..17a723ac9e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminThemesControllerUpdateoptionsAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminThemesControllerUpdateoptionsAfter.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Shop/CommandHandler/UploadLogosHandler.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Shop/CommandHandler/UploadLogosHandler.php' file: src/Adapter/Shop/CommandHandler/UploadLogosHandler.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionAfterCreateFormHandler.md b/modules/concepts/hooks/list-of-hooks/actionAfterCreateFormHandler.md index c857240c11..54291b036e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAfterCreateFormHandler.md +++ b/modules/concepts/hooks/list-of-hooks/actionAfterCreateFormHandler.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Core/Form/IdentifiableObject/Handler/FormHandler.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Core/Form/IdentifiableObject/Handler/FormHandler.php' file: src/Core/Form/IdentifiableObject/Handler/FormHandler.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionAfterLoadRoutes.md b/modules/concepts/hooks/list-of-hooks/actionAfterLoadRoutes.md index 5108267357..406e3150c4 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAfterLoadRoutes.md +++ b/modules/concepts/hooks/list-of-hooks/actionAfterLoadRoutes.md @@ -1,10 +1,10 @@ --- Title: actionAfterLoadRoutes hidden: true -hookTitle: +hookTitle: 'Triggers after loading routes' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.1.x/classes/Dispatcher.php#L708' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Dispatcher.php' file: classes/Dispatcher.php locations: - 'front office' @@ -15,7 +15,7 @@ array_return: false check_exceptions: false chain: false origin: core -description: '' +description: 'Allow modules to modify routes in any way or add their own multilanguage routes.' --- diff --git a/modules/concepts/hooks/list-of-hooks/actionAfterUpdateFormHandler.md b/modules/concepts/hooks/list-of-hooks/actionAfterUpdateFormHandler.md index b27b350f07..fdd7952bf5 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAfterUpdateFormHandler.md +++ b/modules/concepts/hooks/list-of-hooks/actionAfterUpdateFormHandler.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Core/Form/IdentifiableObject/Handler/FormHandler.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Core/Form/IdentifiableObject/Handler/FormHandler.php' file: src/Core/Form/IdentifiableObject/Handler/FormHandler.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionAjaxDieBefore.md b/modules/concepts/hooks/list-of-hooks/actionAjaxDieBefore.md index 3220b013d8..d079fb11cd 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAjaxDieBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAjaxDieBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/Controller.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/Controller.php' file: classes/controller/Controller.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionAttributeCombinationDelete.md b/modules/concepts/hooks/list-of-hooks/actionAttributeCombinationDelete.md index 069259493f..b3db1caee2 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAttributeCombinationDelete.md +++ b/modules/concepts/hooks/list-of-hooks/actionAttributeCombinationDelete.md @@ -1,10 +1,10 @@ --- Title: actionAttributeCombinationDelete hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Combination.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Combination.php' file: classes/Combination.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionAttributeCombinationSave.md b/modules/concepts/hooks/list-of-hooks/actionAttributeCombinationSave.md index a5e7c5e9fd..723853dca4 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAttributeCombinationSave.md +++ b/modules/concepts/hooks/list-of-hooks/actionAttributeCombinationSave.md @@ -1,11 +1,14 @@ --- Title: actionAttributeCombinationSave hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Combination.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Combination.php' file: classes/Combination.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Product/Combination/Create/CombinationCreator.php' + file: src/Adapter/Product/Combination/Create/CombinationCreator.php locations: - 'front office' type: action diff --git a/modules/concepts/hooks/list-of-hooks/actionAttributeDelete.md b/modules/concepts/hooks/list-of-hooks/actionAttributeDelete.md index 3af0405ecb..74504c2ad9 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAttributeDelete.md +++ b/modules/concepts/hooks/list-of-hooks/actionAttributeDelete.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Deleting an attributes features value' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/ProductAttribute.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ProductAttribute.php' file: classes/ProductAttribute.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionAttributeGroupDelete.md b/modules/concepts/hooks/list-of-hooks/actionAttributeGroupDelete.md index 188aea18a0..7dfe99a792 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAttributeGroupDelete.md +++ b/modules/concepts/hooks/list-of-hooks/actionAttributeGroupDelete.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Deleting attribute group' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/AttributeGroup.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/AttributeGroup.php' file: classes/AttributeGroup.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionAttributeGroupSave.md b/modules/concepts/hooks/list-of-hooks/actionAttributeGroupSave.md index 18a7ee0e12..ae8bb4005c 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAttributeGroupSave.md +++ b/modules/concepts/hooks/list-of-hooks/actionAttributeGroupSave.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Saving an attribute group' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/AttributeGroup.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/AttributeGroup.php' file: classes/AttributeGroup.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionAttributeSave.md b/modules/concepts/hooks/list-of-hooks/actionAttributeSave.md index 4e7eaa3d25..3973aedf1a 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAttributeSave.md +++ b/modules/concepts/hooks/list-of-hooks/actionAttributeSave.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Saving an attributes features value' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/ProductAttribute.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ProductAttribute.php' file: classes/ProductAttribute.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionAuthentication.md b/modules/concepts/hooks/list-of-hooks/actionAuthentication.md index 5e34707de9..75a1803bc5 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAuthentication.md +++ b/modules/concepts/hooks/list-of-hooks/actionAuthentication.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Successful customer authentication' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/form/CustomerLoginForm.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/form/CustomerLoginForm.php' file: classes/form/CustomerLoginForm.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionAuthenticationBefore.md b/modules/concepts/hooks/list-of-hooks/actionAuthenticationBefore.md index aadb743461..c94aa5939d 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAuthenticationBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAuthenticationBefore.md @@ -1,10 +1,10 @@ --- Title: actionAuthenticationBefore hidden: true -hookTitle: +hookTitle: 'Triggers before customer logs in' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/form/CustomerLoginForm.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/form/CustomerLoginForm.php' file: classes/form/CustomerLoginForm.php locations: - 'front office' @@ -15,7 +15,7 @@ array_return: false check_exceptions: false chain: false origin: core -description: '' +description: 'Triggers after successful validation of login form, before the login process itself.' --- diff --git a/modules/concepts/hooks/list-of-hooks/actionBeforeAjaxDie.md b/modules/concepts/hooks/list-of-hooks/actionBeforeAjaxDie.md index 14bbe742a4..fe592c8df0 100644 --- a/modules/concepts/hooks/list-of-hooks/actionBeforeAjaxDie.md +++ b/modules/concepts/hooks/list-of-hooks/actionBeforeAjaxDie.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/Controller.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/Controller.php' file: classes/controller/Controller.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionBeforeCreateFormHandler.md b/modules/concepts/hooks/list-of-hooks/actionBeforeCreateFormHandler.md index 7eb0f0c66a..b6196ad8fc 100644 --- a/modules/concepts/hooks/list-of-hooks/actionBeforeCreateFormHandler.md +++ b/modules/concepts/hooks/list-of-hooks/actionBeforeCreateFormHandler.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Core/Form/IdentifiableObject/Handler/FormHandler.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Core/Form/IdentifiableObject/Handler/FormHandler.php' file: src/Core/Form/IdentifiableObject/Handler/FormHandler.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionBeforeUpdateFormHandler.md b/modules/concepts/hooks/list-of-hooks/actionBeforeUpdateFormHandler.md index 1caefaa01b..d974167799 100644 --- a/modules/concepts/hooks/list-of-hooks/actionBeforeUpdateFormHandler.md +++ b/modules/concepts/hooks/list-of-hooks/actionBeforeUpdateFormHandler.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Core/Form/IdentifiableObject/Handler/FormHandler.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Core/Form/IdentifiableObject/Handler/FormHandler.php' file: src/Core/Form/IdentifiableObject/Handler/FormHandler.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionBuildFrontEndObject.md b/modules/concepts/hooks/list-of-hooks/actionBuildFrontEndObject.md index 1f2b646334..92d569d71c 100644 --- a/modules/concepts/hooks/list-of-hooks/actionBuildFrontEndObject.md +++ b/modules/concepts/hooks/list-of-hooks/actionBuildFrontEndObject.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Manage elements added to the "prestashop" javascript object' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/FrontController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/FrontController.php' file: classes/controller/FrontController.php locations: - 'front office' @@ -23,7 +23,5 @@ description: 'This hook allows you to customize the "prestashop" javascript obje ## Call of the Hook in the origin file ```php -Hook::exec('actionBuildFrontEndObject', [ - 'obj' => &$object, - ]) +Hook::exec('actionBuildFrontEndObject', [ 'obj' => &$object, ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionBuildMailLayoutVariables.md b/modules/concepts/hooks/list-of-hooks/actionBuildMailLayoutVariables.md index 5c0f583bd5..0ca8e16033 100644 --- a/modules/concepts/hooks/list-of-hooks/actionBuildMailLayoutVariables.md +++ b/modules/concepts/hooks/list-of-hooks/actionBuildMailLayoutVariables.md @@ -4,8 +4,8 @@ hidden: true hookTitle: 'Build the variables used in email layout rendering' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Core/MailTemplate/Layout/LayoutVariablesBuilder.php' - file: src/Core/MailTemplate/Layout/LayoutVariablesBuilder.php + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Core/MailTemplate/Layout/LayoutVariablesBuilderInterface.php' + file: src/Core/MailTemplate/Layout/LayoutVariablesBuilderInterface.php locations: - 'front office' type: action @@ -24,13 +24,12 @@ description: 'This hook allows to change the variables used when an email layout ## Call of the Hook in the origin file ```php -dispatchWithParameters( - LayoutVariablesBuilderInterface::BUILD_MAIL_LAYOUT_VARIABLES_HOOK, - [ - 'mailLayout' => $mailLayout, - 'mailLayoutVariables' => &$mailLayoutVariables, - ] - ) +public const BUILD_MAIL_LAYOUT_VARIABLES_HOOK = 'actionBuildMailLayoutVariables'; + + /** + * @param LayoutInterface $layout + * @param LanguageInterface $language + * ``` ## Example implementation diff --git a/modules/concepts/hooks/list-of-hooks/actionCarrierProcess.md b/modules/concepts/hooks/list-of-hooks/actionCarrierProcess.md index 2a3067ad13..5e243e6c74 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCarrierProcess.md +++ b/modules/concepts/hooks/list-of-hooks/actionCarrierProcess.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Carrier process' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.0/classes/checkout/CheckoutDeliveryStep.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/checkout/CheckoutDeliveryStep.php' file: classes/checkout/CheckoutDeliveryStep.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionCarrierUpdate.md b/modules/concepts/hooks/list-of-hooks/actionCarrierUpdate.md index ab7bc611d5..96366aae82 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCarrierUpdate.md +++ b/modules/concepts/hooks/list-of-hooks/actionCarrierUpdate.md @@ -4,8 +4,14 @@ hidden: true hookTitle: 'Carrier Update' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/admin/AdminCarriersController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/admin/AdminCarrierWizardController.php' + file: controllers/admin/AdminCarrierWizardController.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/admin/AdminCarriersController.php' file: controllers/admin/AdminCarriersController.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Carrier/CommandHandler/EditCarrierHandler.php' + file: src/Adapter/Carrier/CommandHandler/EditCarrierHandler.php locations: - 'back office' type: action @@ -24,8 +30,5 @@ description: 'This hook is called when a carrier is updated' ## Call of the Hook in the origin file ```php -Hook::exec('actionCarrierUpdate', [ - 'id_carrier' => (int) $current_carrier->id, - 'carrier' => $new_carrier, - ]) +Hook::exec('actionCarrierUpdate', [ 'id_carrier' => (int) $current_carrier->id, 'carrier' => $new_carrier, ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionCartGetPackageShippingCost.md b/modules/concepts/hooks/list-of-hooks/actionCartGetPackageShippingCost.md index 5c9848cc9e..2e520a4c20 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCartGetPackageShippingCost.md +++ b/modules/concepts/hooks/list-of-hooks/actionCartGetPackageShippingCost.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'After getting package shipping cost value' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/classes/Cart.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Cart.php' file: classes/Cart.php locations: - 'front office' @@ -23,17 +23,10 @@ description: 'This hook is called in order to allow to modify package shipping c ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionCartGetPackageShippingCost', +'actionCartGetPackageShippingCost', [ 'cart' => $this, 'id_carrier' => $id_carrier, 'use_tax' => $use_tax, 'default_country' => $default_country, - 'product_list' => $product_list, - 'id_zone' => $id_zone, - 'keepOrderPrices' => $keepOrderPrices, - 'shippingCost' => &$shippingCost, - ] - ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionCartSave.md b/modules/concepts/hooks/list-of-hooks/actionCartSave.md index d368e8a7de..1a2680c80b 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCartSave.md +++ b/modules/concepts/hooks/list-of-hooks/actionCartSave.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Cart creation and update' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Cart.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Cart.php' file: classes/Cart.php locations: - 'front office' @@ -15,7 +15,7 @@ array_return: false check_exceptions: false chain: false origin: core -description: "This hook is displayed when a product is added to the cart or if the cart's content is modified" +description: 'This hook is displayed when a product is added to the cart or if the cart''s content is modified' --- diff --git a/modules/concepts/hooks/list-of-hooks/actionCartSummary.md b/modules/concepts/hooks/list-of-hooks/actionCartSummary.md index 246a482445..1c2bda04f6 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCartSummary.md +++ b/modules/concepts/hooks/list-of-hooks/actionCartSummary.md @@ -1,16 +1,16 @@ --- Title: actionCartSummary hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Cart.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Cart.php' file: classes/Cart.php locations: - 'front office' type: action hookAliases: -array_return: false +array_return: true check_exceptions: false chain: false origin: core @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionCartSummary', $summary, null, true) +$hook = Hook::exec('actionCartSummary', $summary, null, true) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionCartUpdateQuantityBefore.md b/modules/concepts/hooks/list-of-hooks/actionCartUpdateQuantityBefore.md index 73578bb1eb..1ec757de96 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCartUpdateQuantityBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionCartUpdateQuantityBefore.md @@ -1,10 +1,10 @@ --- Title: actionCartUpdateQuantityBefore hidden: true -hookTitle: +hookTitle: 'Triggers before product is added to cart' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Cart.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Cart.php' file: classes/Cart.php locations: - 'front office' @@ -15,7 +15,7 @@ array_return: false check_exceptions: false chain: false origin: core -description: '' +description: 'Allows responding to add to cart events.' --- diff --git a/modules/concepts/hooks/list-of-hooks/actionCategoryAdd.md b/modules/concepts/hooks/list-of-hooks/actionCategoryAdd.md index 21fe0015e6..e97d57134f 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCategoryAdd.md +++ b/modules/concepts/hooks/list-of-hooks/actionCategoryAdd.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Category creation' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Category.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Category.php' file: classes/Category.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionCategoryDelete.md b/modules/concepts/hooks/list-of-hooks/actionCategoryDelete.md index d9aa6e1dce..54b4b42769 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCategoryDelete.md +++ b/modules/concepts/hooks/list-of-hooks/actionCategoryDelete.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Category deletion' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Category.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Category.php' file: classes/Category.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionCategoryUpdate.md b/modules/concepts/hooks/list-of-hooks/actionCategoryUpdate.md index 2e4fdac8ec..a7625cf636 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCategoryUpdate.md +++ b/modules/concepts/hooks/list-of-hooks/actionCategoryUpdate.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Category modification' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/classes/Category.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Category.php' file: classes/Category.php locations: - 'back office' @@ -24,5 +24,5 @@ description: 'This hook is displayed when a category is modified' ## Call of the Hook in the origin file ```php -Hook::exec('actionCategoryUpdate', ['category' => $category]) +Hook::exec('actionCategoryUpdate', ['category' => $this]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionCheckoutRender.md b/modules/concepts/hooks/list-of-hooks/actionCheckoutRender.md index 90aa3d1932..b65be3c4bc 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCheckoutRender.md +++ b/modules/concepts/hooks/list-of-hooks/actionCheckoutRender.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Modify checkout process' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/front/OrderController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/OrderController.php' file: controllers/front/OrderController.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionClearCache.md b/modules/concepts/hooks/list-of-hooks/actionClearCache.md index 943dbfb4da..f33b4c643a 100644 --- a/modules/concepts/hooks/list-of-hooks/actionClearCache.md +++ b/modules/concepts/hooks/list-of-hooks/actionClearCache.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Clear smarty cache' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Tools.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Tools.php' file: classes/Tools.php locations: - 'front office' @@ -14,7 +14,7 @@ array_return: false check_exceptions: false chain: false origin: core -description: "This hook is called when smarty's cache is cleared" +description: 'This hook is called when smarty''s cache is cleared' --- diff --git a/modules/concepts/hooks/list-of-hooks/actionClearCompileCache.md b/modules/concepts/hooks/list-of-hooks/actionClearCompileCache.md index 9c02c9d890..a290251e3d 100644 --- a/modules/concepts/hooks/list-of-hooks/actionClearCompileCache.md +++ b/modules/concepts/hooks/list-of-hooks/actionClearCompileCache.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Clear smarty compile cache' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Tools.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Tools.php' file: classes/Tools.php locations: - 'front office' @@ -14,7 +14,7 @@ array_return: false check_exceptions: false chain: false origin: core -description: "This hook is called when smarty's compile cache is cleared" +description: 'This hook is called when smarty''s compile cache is cleared' --- diff --git a/modules/concepts/hooks/list-of-hooks/actionClearSf2Cache.md b/modules/concepts/hooks/list-of-hooks/actionClearSf2Cache.md index 57c5a97901..495662626e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionClearSf2Cache.md +++ b/modules/concepts/hooks/list-of-hooks/actionClearSf2Cache.md @@ -4,7 +4,10 @@ hidden: true hookTitle: 'Clear Sf2 cache' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Cache/Clearer/SymfonyCacheClearer.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Tools.php' + file: classes/Tools.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Cache/Clearer/SymfonyCacheClearer.php' file: src/Adapter/Cache/Clearer/SymfonyCacheClearer.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionControllerInitAfter.md b/modules/concepts/hooks/list-of-hooks/actionControllerInitAfter.md index 8de5f68d6b..7bbf8757fb 100644 --- a/modules/concepts/hooks/list-of-hooks/actionControllerInitAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionControllerInitAfter.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Perform actions after controller initialization' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/Controller.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/Controller.php' file: classes/controller/Controller.php locations: - 'front office' @@ -23,10 +23,10 @@ description: 'This hook is launched after the initialization of all controllers' ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionControllerInitAfter', +'actionControllerInitAfter', [ 'controller' => $this, ] - ) + ); + } ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionControllerInitBefore.md b/modules/concepts/hooks/list-of-hooks/actionControllerInitBefore.md index 2c4400fa8d..7e4f44570f 100644 --- a/modules/concepts/hooks/list-of-hooks/actionControllerInitBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionControllerInitBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Perform actions before controller initialization' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/Controller.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/Controller.php' file: classes/controller/Controller.php locations: - 'front office' @@ -23,10 +23,9 @@ description: 'This hook is launched before the initialization of all controllers ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionControllerInitBefore', +'actionControllerInitBefore', [ 'controller' => $this, ] - ) + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionCustomerAccountAdd.md b/modules/concepts/hooks/list-of-hooks/actionCustomerAccountAdd.md index ec75e8557b..b4563c9818 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCustomerAccountAdd.md +++ b/modules/concepts/hooks/list-of-hooks/actionCustomerAccountAdd.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Successful customer account creation' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/form/CustomerPersister.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/form/CustomerPersister.php' file: classes/form/CustomerPersister.php locations: - 'front office' @@ -33,7 +33,5 @@ description: 'This hook is called when a new customer creates an account success ## Call of the Hook in the origin file ```php -Hook::exec('actionCustomerAccountAdd', [ - 'newCustomer' => $customer, - ]) +Hook::exec('actionCustomerAccountAdd', [ 'newCustomer' => $customer, ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionCustomerAccountUpdate.md b/modules/concepts/hooks/list-of-hooks/actionCustomerAccountUpdate.md index f854ab7dac..4e4b9b8f25 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCustomerAccountUpdate.md +++ b/modules/concepts/hooks/list-of-hooks/actionCustomerAccountUpdate.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Successful customer account update' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/form/CustomerPersister.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/form/CustomerPersister.php' file: classes/form/CustomerPersister.php locations: - 'front office' @@ -23,7 +23,5 @@ description: 'This hook is called when a customer updates its account successful ## Call of the Hook in the origin file ```php -Hook::exec('actionCustomerAccountUpdate', [ - 'customer' => $customer, - ]) +Hook::exec('actionCustomerAccountUpdate', [ 'customer' => $customer, ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionCustomerAddGroups.md b/modules/concepts/hooks/list-of-hooks/actionCustomerAddGroups.md index e3a25c8e47..3bc0e99b10 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCustomerAddGroups.md +++ b/modules/concepts/hooks/list-of-hooks/actionCustomerAddGroups.md @@ -1,10 +1,10 @@ --- Title: actionCustomerAddGroups hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Customer.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Customer.php' file: classes/Customer.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionCustomerBeforeUpdateGroup.md b/modules/concepts/hooks/list-of-hooks/actionCustomerBeforeUpdateGroup.md index 384bb4f0a2..a0385a38ef 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCustomerBeforeUpdateGroup.md +++ b/modules/concepts/hooks/list-of-hooks/actionCustomerBeforeUpdateGroup.md @@ -1,10 +1,10 @@ --- Title: actionCustomerBeforeUpdateGroup hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Customer.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Customer.php' file: classes/Customer.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionCustomerLogoutAfter.md b/modules/concepts/hooks/list-of-hooks/actionCustomerLogoutAfter.md index 4c3a56a299..2f8a6ec710 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCustomerLogoutAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionCustomerLogoutAfter.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'After customer logout' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Customer.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Customer.php' file: classes/Customer.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionCustomerLogoutBefore.md b/modules/concepts/hooks/list-of-hooks/actionCustomerLogoutBefore.md index d5b224bd79..3bb04bcd16 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCustomerLogoutBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionCustomerLogoutBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Before customer logout' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Customer.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Customer.php' file: classes/Customer.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionDeleteGDPRCustomer.md b/modules/concepts/hooks/list-of-hooks/actionDeleteGDPRCustomer.md index 7e823f3f73..7b81f9c420 100644 --- a/modules/concepts/hooks/list-of-hooks/actionDeleteGDPRCustomer.md +++ b/modules/concepts/hooks/list-of-hooks/actionDeleteGDPRCustomer.md @@ -1,12 +1,12 @@ --- Title: actionDeleteGDPRCustomer hidden: true -hookTitle: +hookTitle: '' files: - module: psgdpr url: 'https://github.com/PrestaShop/psgdpr/blob/master/src/Service/CustomerService.php' - file: modules/psgdpr/src/Service/CustomerService.php + file: src/Service/CustomerService.php locations: - 'front office' type: action diff --git a/modules/concepts/hooks/list-of-hooks/actionDeliveryPriceByPrice.md b/modules/concepts/hooks/list-of-hooks/actionDeliveryPriceByPrice.md index b09c9d467e..de19c386a5 100644 --- a/modules/concepts/hooks/list-of-hooks/actionDeliveryPriceByPrice.md +++ b/modules/concepts/hooks/list-of-hooks/actionDeliveryPriceByPrice.md @@ -1,10 +1,10 @@ --- Title: actionDeliveryPriceByPrice hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Carrier.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Carrier.php' file: classes/Carrier.php locations: - 'front office' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionDeliveryPriceByPrice', ['id_carrier' => $id_carrier, 'order_total' => $order_total, 'id_zone' => $id_zone]) +$price_by_price = Hook::exec('actionDeliveryPriceByPrice', ['id_carrier' => $id_carrier, 'order_total' => $order_total, 'id_zone' => $id_zone]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionDeliveryPriceByWeight.md b/modules/concepts/hooks/list-of-hooks/actionDeliveryPriceByWeight.md index 30de008e6a..3018807187 100644 --- a/modules/concepts/hooks/list-of-hooks/actionDeliveryPriceByWeight.md +++ b/modules/concepts/hooks/list-of-hooks/actionDeliveryPriceByWeight.md @@ -1,10 +1,10 @@ --- Title: actionDeliveryPriceByWeight hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Carrier.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Carrier.php' file: classes/Carrier.php locations: - 'front office' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionDeliveryPriceByWeight', ['id_carrier' => $id_carrier, 'total_weight' => $total_weight, 'id_zone' => $id_zone]) +$price_by_weight = Hook::exec('actionDeliveryPriceByWeight', ['id_carrier' => $id_carrier, 'total_weight' => $total_weight, 'id_zone' => $id_zone]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionDispatcher.md b/modules/concepts/hooks/list-of-hooks/actionDispatcher.md index 0ce710f34b..9c9f72cabc 100644 --- a/modules/concepts/hooks/list-of-hooks/actionDispatcher.md +++ b/modules/concepts/hooks/list-of-hooks/actionDispatcher.md @@ -1,11 +1,14 @@ --- Title: actionDispatcher hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Dispatcher.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Dispatcher.php' file: classes/Dispatcher.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/LegacyController.php' + file: src/PrestaShopBundle/Controller/Admin/LegacyController.php locations: - 'front office' type: action diff --git a/modules/concepts/hooks/list-of-hooks/actionDispatcherAfter.md b/modules/concepts/hooks/list-of-hooks/actionDispatcherAfter.md index 3a82141114..87d8624e5e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionDispatcherAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionDispatcherAfter.md @@ -4,7 +4,13 @@ hidden: true hookTitle: 'After dispatch' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/EventListener/ActionDispatcherLegacyHooksSubscriber.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Dispatcher.php' + file: classes/Dispatcher.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/LegacyController.php' + file: src/PrestaShopBundle/Controller/Admin/LegacyController.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/EventListener/ActionDispatcherLegacyHooksSubscriber.php' file: src/PrestaShopBundle/EventListener/ActionDispatcherLegacyHooksSubscriber.php locations: - 'front office' @@ -23,9 +29,5 @@ description: 'This hook is called at the end of the dispatch method of the Dispa ## Call of the Hook in the origin file ```php -dispatchWithParameters(self::DISPATCHER_AFTER_ACTION, [ - 'controller_type' => $requestAttributes->get('controller_type'), - 'controller_class' => $requestAttributes->get('controller_name'), - 'is_module' => 0, - ]) +Hook::exec('actionDispatcherAfter', $params_hook_action_dispatcher) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionDispatcherBefore.md b/modules/concepts/hooks/list-of-hooks/actionDispatcherBefore.md index 2d00e5edf4..94144a6f05 100644 --- a/modules/concepts/hooks/list-of-hooks/actionDispatcherBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionDispatcherBefore.md @@ -4,8 +4,14 @@ hidden: true hookTitle: 'Before dispatch' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/EventListener/ActionDispatcherLegacyHooksSubscriber.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Dispatcher.php' + file: classes/Dispatcher.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/EventListener/ActionDispatcherLegacyHooksSubscriber.php' file: src/PrestaShopBundle/EventListener/ActionDispatcherLegacyHooksSubscriber.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Routing/LegacyRouterChecker.php' + file: src/PrestaShopBundle/Routing/LegacyRouterChecker.php locations: - 'front office' type: action @@ -23,7 +29,5 @@ description: 'This hook is called at the beginning of the dispatch method of the ## Call of the Hook in the origin file ```php -dispatchWithParameters(self::DISPATCHER_BEFORE_ACTION, [ - 'controller_type' => $controllerType, - ]) +Hook::exec('actionDispatcherBefore', ['controller_type' => $this->front_controller]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionDownloadAttachment.md b/modules/concepts/hooks/list-of-hooks/actionDownloadAttachment.md index 8542130dcd..46805d9b35 100644 --- a/modules/concepts/hooks/list-of-hooks/actionDownloadAttachment.md +++ b/modules/concepts/hooks/list-of-hooks/actionDownloadAttachment.md @@ -1,10 +1,10 @@ --- Title: actionDownloadAttachment hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/front/AttachmentController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/AttachmentController.php' file: controllers/front/AttachmentController.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionEmailAddAfterContent.md b/modules/concepts/hooks/list-of-hooks/actionEmailAddAfterContent.md index 81daaede16..0ba8d5d8e8 100644 --- a/modules/concepts/hooks/list-of-hooks/actionEmailAddAfterContent.md +++ b/modules/concepts/hooks/list-of-hooks/actionEmailAddAfterContent.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Add extra content after mail content' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Mail.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Mail.php' file: classes/Mail.php locations: - 'front office' @@ -23,15 +23,10 @@ description: 'This hook is called just after fetching mail template' ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionEmailAddAfterContent', +'actionEmailAddAfterContent', [ 'template' => $template, 'template_html' => &$templateHtml, 'template_txt' => &$templateTxt, 'id_lang' => (int) $idLang, - ], - null, - true - ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionEmailAddBeforeContent.md b/modules/concepts/hooks/list-of-hooks/actionEmailAddBeforeContent.md index 2f2cbc7dbe..f227a5634e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionEmailAddBeforeContent.md +++ b/modules/concepts/hooks/list-of-hooks/actionEmailAddBeforeContent.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Add extra content before mail content' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Mail.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Mail.php' file: classes/Mail.php locations: - 'front office' @@ -23,15 +23,10 @@ description: 'This hook is called just before fetching mail template' ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionEmailAddBeforeContent', +'actionEmailAddBeforeContent', [ 'template' => $template, 'template_html' => &$templateHtml, 'template_txt' => &$templateTxt, 'id_lang' => (int) $idLang, - ], - null, - true - ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionEmailSendBefore.md b/modules/concepts/hooks/list-of-hooks/actionEmailSendBefore.md index e69a0d8f81..c5656825a5 100644 --- a/modules/concepts/hooks/list-of-hooks/actionEmailSendBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionEmailSendBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Before sending an email' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Mail.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Mail.php' file: classes/Mail.php locations: - 'front office' @@ -23,27 +23,10 @@ description: 'This hook is used to filter the content or the metadata of an emai ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionEmailSendBefore', +'actionEmailSendBefore', [ 'idLang' => &$idLang, 'template' => &$template, 'subject' => &$subject, 'templateVars' => &$templateVars, - 'to' => &$to, - 'toName' => &$toName, - 'from' => &$from, - 'fromName' => &$fromName, - 'fileAttachment' => &$fileAttachment, - 'mode_smtp' => &$mode_smtp, - 'templatePath' => &$templatePath, - 'die' => &$die, - 'idShop' => &$idShop, - 'bcc' => &$bcc, - 'replyTo' => &$replyTo, - 'replyToName' => &$replyToName, - ], - null, - true - ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionExportGDPRData.md b/modules/concepts/hooks/list-of-hooks/actionExportGDPRData.md index 94978549dd..6e3d3f246d 100644 --- a/modules/concepts/hooks/list-of-hooks/actionExportGDPRData.md +++ b/modules/concepts/hooks/list-of-hooks/actionExportGDPRData.md @@ -1,20 +1,20 @@ --- Title: actionExportGDPRData hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/modules/psgdpr/psgdpr.php' - file: modules/psgdpr/psgdpr.php + module: psgdpr + url: 'https://github.com/PrestaShop/psgdpr/blob/dev/psgdpr.php' + file: psgdpr.php locations: - 'front office' type: action hookAliases: -'Hook origin': module array_return: false check_exceptions: false chain: false -origin: core +origin: module description: '' --- diff --git a/modules/concepts/hooks/list-of-hooks/actionFeatureDelete.md b/modules/concepts/hooks/list-of-hooks/actionFeatureDelete.md index 3cf6c00b94..d376be3c21 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFeatureDelete.md +++ b/modules/concepts/hooks/list-of-hooks/actionFeatureDelete.md @@ -1,10 +1,10 @@ --- Title: actionFeatureDelete hidden: true -hookTitle: "Deleting attributes' features" +hookTitle: 'Deleting attributes'' features' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Feature.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Feature.php' file: classes/Feature.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionFeatureSave.md b/modules/concepts/hooks/list-of-hooks/actionFeatureSave.md index 18d0fb7829..4cd76b1735 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFeatureSave.md +++ b/modules/concepts/hooks/list-of-hooks/actionFeatureSave.md @@ -1,10 +1,10 @@ --- Title: actionFeatureSave hidden: true -hookTitle: "Saving attributes' features" +hookTitle: 'Saving attributes'' features' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Feature.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Feature.php' file: classes/Feature.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionFeatureValueDelete.md b/modules/concepts/hooks/list-of-hooks/actionFeatureValueDelete.md index 21997d7aac..02ed93f03c 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFeatureValueDelete.md +++ b/modules/concepts/hooks/list-of-hooks/actionFeatureValueDelete.md @@ -1,10 +1,10 @@ --- Title: actionFeatureValueDelete hidden: true -hookTitle: "Deleting attributes' features' values" +hookTitle: 'Deleting attributes'' features'' values' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/FeatureValue.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/FeatureValue.php' file: classes/FeatureValue.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionFeatureValueSave.md b/modules/concepts/hooks/list-of-hooks/actionFeatureValueSave.md index c1b7a2dc15..5aa94f989e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFeatureValueSave.md +++ b/modules/concepts/hooks/list-of-hooks/actionFeatureValueSave.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Saving an attributes features value' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/FeatureValue.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/FeatureValue.php' file: classes/FeatureValue.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionFilterDeliveryOptionList.md b/modules/concepts/hooks/list-of-hooks/actionFilterDeliveryOptionList.md index 56e3035c47..16c0c5d4c2 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFilterDeliveryOptionList.md +++ b/modules/concepts/hooks/list-of-hooks/actionFilterDeliveryOptionList.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Modify delivery option list result' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Cart.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Cart.php' file: classes/Cart.php locations: - 'front office' @@ -33,12 +33,12 @@ description: 'This hook allows you to modify delivery option list' ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionFilterDeliveryOptionList', - [ - 'delivery_option_list' => &$delivery_option_list, - ] -) +'actionFilterDeliveryOptionList', + [ + 'delivery_option_list' => &$delivery_option_list, + 'cart' => $this, + ] + ); ``` ## Example implementation diff --git a/modules/concepts/hooks/list-of-hooks/actionFrontControllerDetectContextCountryAfter.md b/modules/concepts/hooks/list-of-hooks/actionFrontControllerDetectContextCountryAfter.md index 9aa7655703..7724a22684 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFrontControllerDetectContextCountryAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionFrontControllerDetectContextCountryAfter.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Action after detecting context country' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/classes/controller/FrontController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/FrontController.php' file: classes/controller/FrontController.php locations: - 'front office' @@ -23,8 +23,7 @@ description: 'Allows modules to modify the context country after it has been det ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionFrontControllerDetectContextCountryAfter', +'actionFrontControllerDetectContextCountryAfter', [ 'controller' => $this, ] diff --git a/modules/concepts/hooks/list-of-hooks/actionFrontControllerInitAfter.md b/modules/concepts/hooks/list-of-hooks/actionFrontControllerInitAfter.md index bd4f566525..f2606f79ef 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFrontControllerInitAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionFrontControllerInitAfter.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Perform actions after front office controller initialization' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/FrontController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/FrontController.php' file: classes/controller/FrontController.php locations: - 'front office' @@ -24,10 +24,5 @@ description: 'This hook is launched after the initialization of all front office ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionFrontControllerInitAfter', - [ - 'controller' => $this, - ] - ) +'actionFrontControllerInitAfter', [ 'controller' => $this, ] ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionFrontControllerInitBefore.md b/modules/concepts/hooks/list-of-hooks/actionFrontControllerInitBefore.md index 362b9e52c7..f3a9fd5d78 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFrontControllerInitBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionFrontControllerInitBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Perform actions before front office controller initialization' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/FrontController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/FrontController.php' file: classes/controller/FrontController.php locations: - 'front office' @@ -23,10 +23,5 @@ description: 'This hook is launched before the initialization of all front offic ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionFrontControllerInitBefore', - [ - 'controller' => $this, - ] - ) +'actionFrontControllerInitBefore', [ 'controller' => $this, ] ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionFrontControllerInitContextCurrencyAfter.md b/modules/concepts/hooks/list-of-hooks/actionFrontControllerInitContextCurrencyAfter.md index c56fe6f124..f64c1ef5c1 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFrontControllerInitContextCurrencyAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionFrontControllerInitContextCurrencyAfter.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Action after initializing context currency' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/classes/controller/FrontController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/FrontController.php' file: classes/controller/FrontController.php locations: - 'front office' @@ -23,8 +23,7 @@ description: 'Allows modules to modify the context currency after it has been in ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionFrontControllerInitContextCurrencyAfter', +'actionFrontControllerInitContextCurrencyAfter', [ 'controller' => $this, ] diff --git a/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetMedia.md b/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetMedia.md index 3a7bf3a065..35160d37e2 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetMedia.md +++ b/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetMedia.md @@ -1,10 +1,10 @@ --- Title: actionFrontControllerSetMedia hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/FrontController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/FrontController.php' file: classes/controller/FrontController.php locations: - 'front office' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionFrontControllerSetMedia', []) +Hook::exec('actionFrontControllerSetMedia') ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetVariables.md b/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetVariables.md index b67a329c95..19a820ea0e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetVariables.md +++ b/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetVariables.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Add variables in JavaScript object and Smarty templates' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/FrontController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/FrontController.php' file: classes/controller/FrontController.php locations: - 'front office' @@ -40,12 +40,10 @@ description: 'Add variables to javascript object that is available in Front Offi ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionFrontControllerSetVariables', +'actionFrontControllerSetVariables', [ 'templateVars' => &$templateVars, ], null, true - ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetVariablesBefore.md b/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetVariablesBefore.md index 1d6f2cb7a7..579d29c31c 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetVariablesBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetVariablesBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Add general purpose variables in JavaScript object and Smarty templates before assignation.' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/classes/controller/FrontController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/FrontController.php' file: classes/controller/FrontController.php locations: - 'front office' @@ -23,8 +23,7 @@ description: 'Allows defining variables for the JavaScript object before the cor ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionFrontControllerSetVariablesBefore', +'actionFrontControllerSetVariablesBefore', [ 'templateVars' => &$templateVars, 'cart' => $cart, diff --git a/modules/concepts/hooks/list-of-hooks/actionGenerateDocumentReference.md b/modules/concepts/hooks/list-of-hooks/actionGenerateDocumentReference.md index d266ad18cc..912f45d7f3 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGenerateDocumentReference.md +++ b/modules/concepts/hooks/list-of-hooks/actionGenerateDocumentReference.md @@ -1,10 +1,10 @@ --- Title: actionGenerateDocumentReference hidden: true -hookTitle: 'Modify document reference for Order' +hookTitle: 'Modify document reference' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.1.x/classes/order/Order.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/order/Order.php' file: classes/order/Order.php locations: - 'front office' @@ -14,7 +14,7 @@ array_return: false check_exceptions: false chain: false origin: core -description: 'This hook allows modules to return custom document references for order' +description: 'This hook allows modules to return custom document references' --- @@ -23,7 +23,5 @@ description: 'This hook allows modules to return custom document references for ## Call of the Hook in the origin file ```php -$reference = Hook::exec('actionGenerateDocumentReference', [ - 'type' => 'order', -]); +$reference = Hook::exec('actionGenerateDocumentReference', [ 'type' => 'order', ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionGetAdminOrderButtons.md b/modules/concepts/hooks/list-of-hooks/actionGetAdminOrderButtons.md index c694482fb1..b94a98746f 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGetAdminOrderButtons.md +++ b/modules/concepts/hooks/list-of-hooks/actionGetAdminOrderButtons.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Admin Order Buttons' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Sell/Order/OrderController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Sell/Order/OrderController.php' file: src/PrestaShopBundle/Controller/Admin/Sell/Order/OrderController.php locations: - 'back office' @@ -35,14 +35,12 @@ description: 'This hook is used to generate the buttons collection on the order ## Call of the Hook in the origin file ```php -dispatchHook( - 'actionGetAdminOrderButtons', +'actionGetAdminOrderButtons', [ 'controller' => $this, 'id_order' => $orderId, - 'actions_bar_buttons_collection' => $back officeOrderButtons, + 'actions_bar_buttons_collection' => $backOfficeOrderButtons, ] - ) ``` ## Example implementation diff --git a/modules/concepts/hooks/list-of-hooks/actionGetAdminToolbarButtons.md b/modules/concepts/hooks/list-of-hooks/actionGetAdminToolbarButtons.md index 8c3704e055..2318108ed0 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGetAdminToolbarButtons.md +++ b/modules/concepts/hooks/list-of-hooks/actionGetAdminToolbarButtons.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Allows to add buttons in any toolbar in the back office' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/AdminController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' file: classes/controller/AdminController.php locations: - 'back office' @@ -33,8 +33,5 @@ description: 'This hook allows you to define descriptions of buttons to add in a ## Call of the Hook in the origin file ```php -Hook::exec('actionGetAdminToolbarButtons', [ - 'controller' => $this, - 'toolbar_extra_buttons_collection' => &$toolbarButtonsCollection, - ]) +Hook::exec('actionGetAdminToolbarButtons', [ 'controller' => $this, 'toolbar_extra_buttons_collection' => &$toolbarButtonsCollection, ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionGetAlternativeSearchPanels.md b/modules/concepts/hooks/list-of-hooks/actionGetAlternativeSearchPanels.md index b80dd89765..0b67c51e3e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGetAlternativeSearchPanels.md +++ b/modules/concepts/hooks/list-of-hooks/actionGetAlternativeSearchPanels.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Additional search panel' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/admin/AdminSearchController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/admin/AdminSearchController.php' file: controllers/admin/AdminSearchController.php locations: - 'back office' @@ -33,13 +33,10 @@ description: 'This hook allows to add an additional search panel for external pr ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionGetAlternativeSearchPanels', +'actionGetAlternativeSearchPanels', [ 'previous_search_panels' => $searchPanels, 'bo_query' => $searchedExpression, ], null, - true - ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionGetExtraMailTemplateVars.md b/modules/concepts/hooks/list-of-hooks/actionGetExtraMailTemplateVars.md index 813d945b83..116d21e146 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGetExtraMailTemplateVars.md +++ b/modules/concepts/hooks/list-of-hooks/actionGetExtraMailTemplateVars.md @@ -1,10 +1,10 @@ --- Title: actionGetExtraMailTemplateVars hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Mail.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Mail.php' file: classes/Mail.php locations: - 'front office' @@ -23,15 +23,10 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionGetExtraMailTemplateVars', +'actionGetExtraMailTemplateVars', [ 'template' => $template, 'template_vars' => $templateVars, 'extra_template_vars' => &$extraTemplateVars, 'id_lang' => (int) $idLang, - ], - null, - true - ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionGetIDZoneByAddressID.md b/modules/concepts/hooks/list-of-hooks/actionGetIDZoneByAddressID.md index 30bf3a0256..fe0b03d6ee 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGetIDZoneByAddressID.md +++ b/modules/concepts/hooks/list-of-hooks/actionGetIDZoneByAddressID.md @@ -1,10 +1,10 @@ --- Title: actionGetIDZoneByAddressID hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Address.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Address.php' file: classes/Address.php locations: - 'front office' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionGetIDZoneByAddressID', ['id_address' => $id_address]) +$id_zone = Hook::exec('actionGetIDZoneByAddressID', ['id_address' => $id_address]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesAfter.md b/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesAfter.md index 0b1203af71..5387182719 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesAfter.md @@ -1,10 +1,13 @@ --- Title: actionGetProductPropertiesAfter hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Product.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Hook.php' + file: classes/Hook.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Product.php' file: classes/Product.php locations: - 'front office' @@ -23,9 +26,10 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionGetProductPropertiesAfter', [ - 'id_lang' => $id_lang, - 'product' => &$row, - 'context' => $context, - ]) +'actionGetProductPropertiesAfter' => ['from' => '1.7.8.0'], + ]; + + public const MODULE_LIST_BY_HOOK_KEY = 'hook_module_exec_list_'; + + public function add($autodate = true, $null_values = false) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesAfterUnitPrice.md b/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesAfterUnitPrice.md index 1657dd9c4f..68aef46cba 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesAfterUnitPrice.md +++ b/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesAfterUnitPrice.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Product Properties' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Product.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Product.php' file: classes/Product.php locations: - 'front office' @@ -23,9 +23,5 @@ description: 'This hook is called after defining the properties of a product' ## Call of the Hook in the origin file ```php -Hook::exec('actionGetProductPropertiesAfterUnitPrice', [ - 'id_lang' => $id_lang, - 'product' => &$row, - 'context' => $context, - ]) +Hook::exec('actionGetProductPropertiesAfterUnitPrice', [ 'id_lang' => $id_lang, 'product' => &$row, 'context' => $context, ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesBefore.md b/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesBefore.md index e9c4d68d5c..1d95d05640 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesBefore.md @@ -1,10 +1,10 @@ --- Title: actionGetProductPropertiesBefore hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Product.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Product.php' file: classes/Product.php locations: - 'front office' @@ -23,9 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionGetProductPropertiesBefore', [ - 'id_lang' => $id_lang, - 'product' => &$row, - 'context' => $context, - ]) +Hook::exec('actionGetProductPropertiesBefore', [ 'id_lang' => $id_lang, 'product' => &$row, 'context' => $context, ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionHtaccessCreate.md b/modules/concepts/hooks/list-of-hooks/actionHtaccessCreate.md index 249983da4b..b2e0ba8b9d 100644 --- a/modules/concepts/hooks/list-of-hooks/actionHtaccessCreate.md +++ b/modules/concepts/hooks/list-of-hooks/actionHtaccessCreate.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'After htaccess creation' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/classes/Tools.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Tools.php' file: classes/Tools.php locations: - 'front office' @@ -24,5 +24,5 @@ description: 'This hook is displayed after the htaccess creation' ## Call of the Hook in the origin file ```php -Hook::exec('actionHtaccessCreate', ['path' => $path]); +Hook::exec('actionHtaccessCreate', ['path' => $path]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionInvoiceNumberFormatted.md b/modules/concepts/hooks/list-of-hooks/actionInvoiceNumberFormatted.md index 6516525a36..3f6301450e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionInvoiceNumberFormatted.md +++ b/modules/concepts/hooks/list-of-hooks/actionInvoiceNumberFormatted.md @@ -1,10 +1,10 @@ --- Title: actionInvoiceNumberFormatted hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/order/OrderInvoice.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/order/OrderInvoice.php' file: classes/order/OrderInvoice.php locations: - 'front office' @@ -23,10 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionInvoiceNumberFormatted', [ - get_class($this) => $this, - 'id_lang' => (int) $id_lang, - 'id_shop' => (int) $id_shop, - 'number' => (int) $this->number, - ]) +$invoice_formatted_number = Hook::exec('actionInvoiceNumberFormatted', [ get_class($this) => $this, 'id_lang' => (int) $id_lang, 'id_shop' => (int) $id_shop, 'number' => (int) $this->number, ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionLanguageLinkParameters.md b/modules/concepts/hooks/list-of-hooks/actionLanguageLinkParameters.md index f12b89a0dd..95e8af6c42 100644 --- a/modules/concepts/hooks/list-of-hooks/actionLanguageLinkParameters.md +++ b/modules/concepts/hooks/list-of-hooks/actionLanguageLinkParameters.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Add parameters to language link' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/classes/Link.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Link.php' file: classes/Link.php locations: - 'front office' @@ -23,8 +23,10 @@ description: 'Allows modules to provide proper parameters for links in other lan ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionLanguageLinkParameters', +'actionLanguageLinkParameters', ['linkParams' => &$params, 'linkIdLang' => (int) $idLang] ); + unset($params['fc'], $params['module']); + + return $this->getModuleLink($module, $controller, $params, null, (int) $idLang); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionLoggerLogMessage.md b/modules/concepts/hooks/list-of-hooks/actionLoggerLogMessage.md index 66862d865e..d6896130bd 100644 --- a/modules/concepts/hooks/list-of-hooks/actionLoggerLogMessage.md +++ b/modules/concepts/hooks/list-of-hooks/actionLoggerLogMessage.md @@ -2,7 +2,10 @@ Title: actionLoggerLogMessage hidden: true hookTitle: 'Allows to make extra action while a log is triggered' -files: { } +files: + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/log/AbstractLogger.php' + file: classes/log/AbstractLogger.php locations: - 'back office' - 'front office' @@ -12,7 +15,7 @@ array_return: false check_exceptions: false chain: false origin: core -description: '' +description: 'This hook allows to make an extra action while an exception is thrown and the logger logs it' --- @@ -21,13 +24,10 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionLoggerLogMessage', - [ - 'message' => $message, - 'level' => $level, - 'isLogged' => $level >= $this->level, - ] -); +'actionLoggerLogMessage', + [ + 'message' => $message, + 'level' => $level, + 'isLogged' => $level >= $this->level, + ] ``` - diff --git a/modules/concepts/hooks/list-of-hooks/actionMailAlterMessageBeforeSend.md b/modules/concepts/hooks/list-of-hooks/actionMailAlterMessageBeforeSend.md index 5b6dfb5483..4cd6d516b4 100644 --- a/modules/concepts/hooks/list-of-hooks/actionMailAlterMessageBeforeSend.md +++ b/modules/concepts/hooks/list-of-hooks/actionMailAlterMessageBeforeSend.md @@ -1,10 +1,10 @@ --- Title: actionMailAlterMessageBeforeSend hidden: true -hookTitle: +hookTitle: 'Modify Swift Message before sending' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Mail.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Mail.php' file: classes/Mail.php locations: - 'front office' @@ -14,7 +14,7 @@ array_return: false check_exceptions: false chain: false origin: core -description: '' +description: 'This hook is called before the Swift Message is sent in Mail.php' --- @@ -23,7 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionMailAlterMessageBeforeSend', [ - 'message' => &$message, - ]) +Hook::exec('actionMailAlterMessageBeforeSend', [ 'message' => &$email, ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionMainMenuModifier.md b/modules/concepts/hooks/list-of-hooks/actionMainMenuModifier.md index 0923e7feac..1b4ac38d7d 100644 --- a/modules/concepts/hooks/list-of-hooks/actionMainMenuModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionMainMenuModifier.md @@ -4,8 +4,9 @@ hidden: true hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/modules/ps_mainmenu/ps_mainmenu.php' - file: modules/ps_mainmenu/ps_mainmenu.php + module: ps_mainmenu + url: 'https://github.com/PrestaShop/ps_mainmenu/blob/dev/ps_mainmenu.php' + file: ps_mainmenu.php locations: - 'front office' type: action @@ -13,7 +14,7 @@ hookAliases: array_return: false check_exceptions: false chain: false -origin: core +origin: module description: '' --- diff --git a/modules/concepts/hooks/list-of-hooks/actionModifyFrontendSitemap.md b/modules/concepts/hooks/list-of-hooks/actionModifyFrontendSitemap.md index 4793c9b3ef..6edf9b9e95 100644 --- a/modules/concepts/hooks/list-of-hooks/actionModifyFrontendSitemap.md +++ b/modules/concepts/hooks/list-of-hooks/actionModifyFrontendSitemap.md @@ -1,10 +1,10 @@ --- Title: actionModifyFrontendSitemap hidden: true -hookTitle: 'Allows modules to add own urls (even whole new groups) to frontend sitemap.' +hookTitle: 'Add or remove links on sitemap page' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.1.x/controllers/front/SitemapController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/SitemapController.php' file: controllers/front/SitemapController.php locations: - 'front office' @@ -15,7 +15,7 @@ array_return: false check_exceptions: false chain: false origin: core -description: 'For example landing pages, blog posts and others.' +description: 'This hook allows to modify links on sitemap page of your shop. Useful to improve indexation of your modules.' --- @@ -24,16 +24,12 @@ description: 'For example landing pages, blog posts and others.' ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionModifyFrontendSitemap', - ['urls' => &$sitemapUrls], - null, - false, - true, - false, - null, - true -); +'actionModifyFrontendSitemap', + ['urls' => &$sitemapUrls] + ); + + /* + * Backward compatibility with older themes. ``` ## Example implementation @@ -52,5 +48,4 @@ public function hookActionModifyFrontendSitemap($params) $params['urls']['pages']['links'] = array_merge($params['urls']['pages']['links'], $customUrls); // add custom urls to pages group unset($params['urls']['categories']); // hide categories } -``` - +``` \ No newline at end of file diff --git a/modules/concepts/hooks/list-of-hooks/actionModuleInstallAfter.md b/modules/concepts/hooks/list-of-hooks/actionModuleInstallAfter.md index 2bcb6b131c..6a6dd35050 100644 --- a/modules/concepts/hooks/list-of-hooks/actionModuleInstallAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionModuleInstallAfter.md @@ -1,10 +1,10 @@ --- Title: actionModuleInstallAfter hidden: true -hookTitle: actionModuleInstallAfter +hookTitle: 'actionModuleInstallAfter' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/module/Module.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/module/Module.php' file: classes/module/Module.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionModuleInstallBefore.md b/modules/concepts/hooks/list-of-hooks/actionModuleInstallBefore.md index 005d9ea685..f42a3900fe 100644 --- a/modules/concepts/hooks/list-of-hooks/actionModuleInstallBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionModuleInstallBefore.md @@ -1,10 +1,10 @@ --- Title: actionModuleInstallBefore hidden: true -hookTitle: actionModuleInstallBefore +hookTitle: 'actionModuleInstallBefore' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/module/Module.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/module/Module.php' file: classes/module/Module.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionModuleMailAlertSendCustomer.md b/modules/concepts/hooks/list-of-hooks/actionModuleMailAlertSendCustomer.md index 336e9dfd57..929a72c760 100644 --- a/modules/concepts/hooks/list-of-hooks/actionModuleMailAlertSendCustomer.md +++ b/modules/concepts/hooks/list-of-hooks/actionModuleMailAlertSendCustomer.md @@ -1,7 +1,7 @@ --- Title: actionModuleMailAlertSendCustomer hidden: true -hookTitle: +hookTitle: '' files: - module: ps_emailalerts diff --git a/modules/concepts/hooks/list-of-hooks/actionModuleRegisterHookAfter.md b/modules/concepts/hooks/list-of-hooks/actionModuleRegisterHookAfter.md index 2f8587e673..c36cb212c6 100644 --- a/modules/concepts/hooks/list-of-hooks/actionModuleRegisterHookAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionModuleRegisterHookAfter.md @@ -1,10 +1,10 @@ --- Title: actionModuleRegisterHookAfter hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Hook.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Hook.php' file: classes/Hook.php locations: - 'front office' @@ -23,11 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionModuleRegisterHookAfter', - [ - 'object' => $module_instance, - 'hook_name' => $hook_name, - ] - ) +Hook::exec('actionModuleRegisterHookAfter', [ 'object' => $module_instance, 'hook_name' => $hook_name, ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionModuleRegisterHookBefore.md b/modules/concepts/hooks/list-of-hooks/actionModuleRegisterHookBefore.md index db460c35dc..b8f6e05cda 100644 --- a/modules/concepts/hooks/list-of-hooks/actionModuleRegisterHookBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionModuleRegisterHookBefore.md @@ -1,10 +1,10 @@ --- Title: actionModuleRegisterHookBefore hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Hook.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Hook.php' file: classes/Hook.php locations: - 'front office' @@ -23,11 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionModuleRegisterHookBefore', - [ - 'object' => $module_instance, - 'hook_name' => $hook_name, - ] - ) +Hook::exec('actionModuleRegisterHookBefore', [ 'object' => $module_instance, 'hook_name' => $hook_name, ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionModuleUnRegisterHookAfter.md b/modules/concepts/hooks/list-of-hooks/actionModuleUnRegisterHookAfter.md index d72ed21c86..84881ef1b6 100644 --- a/modules/concepts/hooks/list-of-hooks/actionModuleUnRegisterHookAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionModuleUnRegisterHookAfter.md @@ -1,10 +1,10 @@ --- Title: actionModuleUnRegisterHookAfter hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Hook.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Hook.php' file: classes/Hook.php locations: - 'front office' @@ -23,11 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionModuleUnRegisterHookAfter', - [ - 'object' => $module_instance, - 'hook_name' => $hook_name, - ] - ) +Hook::exec('actionModuleUnRegisterHookAfter', [ 'object' => $module_instance, 'hook_name' => $hook_name, ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionModuleUnRegisterHookBefore.md b/modules/concepts/hooks/list-of-hooks/actionModuleUnRegisterHookBefore.md index 5df349eede..c41da87e91 100644 --- a/modules/concepts/hooks/list-of-hooks/actionModuleUnRegisterHookBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionModuleUnRegisterHookBefore.md @@ -1,10 +1,10 @@ --- Title: actionModuleUnRegisterHookBefore hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Hook.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Hook.php' file: classes/Hook.php locations: - 'front office' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionModuleUnRegisterHookBefore', ['object' => $module_instance, 'hook_name' => $hook_name]) +Hook::exec('actionModuleUnRegisterHookBefore', [ 'object' => $module_instance, 'hook_name' => $hook_name, ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionModuleUninstallAfter.md b/modules/concepts/hooks/list-of-hooks/actionModuleUninstallAfter.md index 18773e5e97..10c623e983 100644 --- a/modules/concepts/hooks/list-of-hooks/actionModuleUninstallAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionModuleUninstallAfter.md @@ -1,10 +1,10 @@ --- Title: actionModuleUninstallAfter hidden: true -hookTitle: actionModuleUninstallAfter +hookTitle: 'actionModuleUninstallAfter' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/module/Module.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/module/Module.php' file: classes/module/Module.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionModuleUninstallBefore.md b/modules/concepts/hooks/list-of-hooks/actionModuleUninstallBefore.md index 3c3b23bfe6..e7a341c250 100644 --- a/modules/concepts/hooks/list-of-hooks/actionModuleUninstallBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionModuleUninstallBefore.md @@ -1,10 +1,10 @@ --- Title: actionModuleUninstallBefore hidden: true -hookTitle: actionModuleUninstallBefore +hookTitle: 'actionModuleUninstallBefore' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/module/Module.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/module/Module.php' file: classes/module/Module.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionNewsletterRegistrationAfter.md b/modules/concepts/hooks/list-of-hooks/actionNewsletterRegistrationAfter.md index 080873e066..d0447f5099 100644 --- a/modules/concepts/hooks/list-of-hooks/actionNewsletterRegistrationAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionNewsletterRegistrationAfter.md @@ -1,7 +1,7 @@ --- Title: actionNewsletterRegistrationAfter hidden: true -hookTitle: +hookTitle: '' files: - module: ps_emailsubscription diff --git a/modules/concepts/hooks/list-of-hooks/actionNewsletterRegistrationBefore.md b/modules/concepts/hooks/list-of-hooks/actionNewsletterRegistrationBefore.md index d2c62ef263..36097ad77b 100644 --- a/modules/concepts/hooks/list-of-hooks/actionNewsletterRegistrationBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionNewsletterRegistrationBefore.md @@ -1,7 +1,7 @@ --- Title: actionNewsletterRegistrationBefore hidden: true -hookTitle: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/ps_emailsubscription/blob/master/ps_emailsubscription.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionObjectAddAfter.md b/modules/concepts/hooks/list-of-hooks/actionObjectAddAfter.md index e1ae78bac5..4f05b72063 100644 --- a/modules/concepts/hooks/list-of-hooks/actionObjectAddAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionObjectAddAfter.md @@ -1,10 +1,10 @@ --- Title: actionObjectAddAfter hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/ObjectModel.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ObjectModel.php' file: classes/ObjectModel.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionObjectAddBefore.md b/modules/concepts/hooks/list-of-hooks/actionObjectAddBefore.md index 5b0c122c4c..7dbb2c2534 100644 --- a/modules/concepts/hooks/list-of-hooks/actionObjectAddBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionObjectAddBefore.md @@ -1,10 +1,10 @@ --- Title: actionObjectAddBefore hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/ObjectModel.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ObjectModel.php' file: classes/ObjectModel.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionObjectDeleteAfter.md b/modules/concepts/hooks/list-of-hooks/actionObjectDeleteAfter.md index 7b97a94e3e..060452ea6b 100644 --- a/modules/concepts/hooks/list-of-hooks/actionObjectDeleteAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionObjectDeleteAfter.md @@ -1,10 +1,10 @@ --- Title: actionObjectDeleteAfter hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/ObjectModel.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ObjectModel.php' file: classes/ObjectModel.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionObjectDeleteBefore.md b/modules/concepts/hooks/list-of-hooks/actionObjectDeleteBefore.md index bc371abf5b..2eea1efdba 100644 --- a/modules/concepts/hooks/list-of-hooks/actionObjectDeleteBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionObjectDeleteBefore.md @@ -1,10 +1,10 @@ --- Title: actionObjectDeleteBefore hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/ObjectModel.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ObjectModel.php' file: classes/ObjectModel.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionObjectProductCommentValidateAfter.md b/modules/concepts/hooks/list-of-hooks/actionObjectProductCommentValidateAfter.md index 01fb789e29..f71b14feb6 100644 --- a/modules/concepts/hooks/list-of-hooks/actionObjectProductCommentValidateAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionObjectProductCommentValidateAfter.md @@ -1,7 +1,7 @@ --- Title: actionObjectProductCommentValidateAfter hidden: true -hookTitle: +hookTitle: '' files: - module: productcomments diff --git a/modules/concepts/hooks/list-of-hooks/actionObjectProductInCartDeleteAfter.md b/modules/concepts/hooks/list-of-hooks/actionObjectProductInCartDeleteAfter.md index 9f8471f1d4..4bd4897848 100644 --- a/modules/concepts/hooks/list-of-hooks/actionObjectProductInCartDeleteAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionObjectProductInCartDeleteAfter.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Cart product removal' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/front/CartController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/CartController.php' file: controllers/front/CartController.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionObjectProductInCartDeleteBefore.md b/modules/concepts/hooks/list-of-hooks/actionObjectProductInCartDeleteBefore.md index b5b3c5d86f..fc89775dbb 100644 --- a/modules/concepts/hooks/list-of-hooks/actionObjectProductInCartDeleteBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionObjectProductInCartDeleteBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Cart product removal' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/front/CartController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/CartController.php' file: controllers/front/CartController.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionObjectUpdateAfter.md b/modules/concepts/hooks/list-of-hooks/actionObjectUpdateAfter.md index b1dff5faa3..76984b250b 100644 --- a/modules/concepts/hooks/list-of-hooks/actionObjectUpdateAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionObjectUpdateAfter.md @@ -1,10 +1,10 @@ --- Title: actionObjectUpdateAfter hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/ObjectModel.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ObjectModel.php' file: classes/ObjectModel.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionObjectUpdateBefore.md b/modules/concepts/hooks/list-of-hooks/actionObjectUpdateBefore.md index 9d915c0b94..218c4cdd95 100644 --- a/modules/concepts/hooks/list-of-hooks/actionObjectUpdateBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionObjectUpdateBefore.md @@ -1,10 +1,10 @@ --- Title: actionObjectUpdateBefore hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/ObjectModel.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ObjectModel.php' file: classes/ObjectModel.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionOnImageCutAfter.md b/modules/concepts/hooks/list-of-hooks/actionOnImageCutAfter.md index 72a746a002..b46377b304 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOnImageCutAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionOnImageCutAfter.md @@ -1,10 +1,10 @@ --- Title: actionOnImageCutAfter hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/ImageManager.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ImageManager.php' file: classes/ImageManager.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionOnImageResizeAfter.md b/modules/concepts/hooks/list-of-hooks/actionOnImageResizeAfter.md index 35d54300e9..b680306623 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOnImageResizeAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionOnImageResizeAfter.md @@ -1,10 +1,10 @@ --- Title: actionOnImageResizeAfter hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/ImageManager.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ImageManager.php' file: classes/ImageManager.php locations: - 'front office' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionOnImageResizeAfter', ['dst_file' => $destinationFile, 'file_type' => $fileType]) +Hook::exec('actionOnImageResizeAfter', ['dst_file' => $destinationFile, 'file_type' => $destinationFileType]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionOrderEdited.md b/modules/concepts/hooks/list-of-hooks/actionOrderEdited.md index e301d25d88..b50636b47a 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOrderEdited.md +++ b/modules/concepts/hooks/list-of-hooks/actionOrderEdited.md @@ -4,7 +4,13 @@ hidden: true hookTitle: 'Order edited' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Order/CommandHandler/UpdateProductInOrderHandler.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Order/CommandHandler/AddProductToOrderHandler.php' + file: src/Adapter/Order/CommandHandler/AddProductToOrderHandler.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Order/CommandHandler/DeleteProductFromOrderHandler.php' + file: src/Adapter/Order/CommandHandler/DeleteProductFromOrderHandler.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Order/CommandHandler/UpdateProductInOrderHandler.php' file: src/Adapter/Order/CommandHandler/UpdateProductInOrderHandler.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionOrderHistoryAddAfter.md b/modules/concepts/hooks/list-of-hooks/actionOrderHistoryAddAfter.md index a0067475a4..3de19a59fb 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOrderHistoryAddAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionOrderHistoryAddAfter.md @@ -1,17 +1,17 @@ --- Title: actionOrderHistoryAddAfter hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/order/OrderHistory.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/order/OrderHistory.php' file: classes/order/OrderHistory.php locations: - 'front office' type: action hookAliases: array_return: false -check_exceptions: false +check_exceptions: true chain: false origin: core description: '' diff --git a/modules/concepts/hooks/list-of-hooks/actionOrderReturn.md b/modules/concepts/hooks/list-of-hooks/actionOrderReturn.md index 14019b0f24..dc65508541 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOrderReturn.md +++ b/modules/concepts/hooks/list-of-hooks/actionOrderReturn.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Returned product' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/front/OrderFollowController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/OrderFollowController.php' file: controllers/front/OrderFollowController.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionOrderSlipAdd.md b/modules/concepts/hooks/list-of-hooks/actionOrderSlipAdd.md index 008bfb2c05..7f09f1c670 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOrderSlipAdd.md +++ b/modules/concepts/hooks/list-of-hooks/actionOrderSlipAdd.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Order slip creation' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Order/Refund/OrderSlipCreator.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Order/Refund/OrderSlipCreator.php' file: src/Adapter/Order/Refund/OrderSlipCreator.php locations: - 'front office' @@ -12,7 +12,7 @@ type: action hookAliases: - orderSlip array_return: false -check_exceptions: false +check_exceptions: true chain: false origin: core description: 'This hook is called when a new credit slip is added regarding client order' @@ -46,9 +46,5 @@ description: 'This hook is called when a new credit slip is added regarding clie ## Call of the Hook in the origin file ```php -Hook::exec('actionOrderSlipAdd', [ - 'order' => $order, - 'productList' => $orderRefundSummary->getProductRefunds(), - 'qtyList' => $fullQuantityList, - ], null, false, true, false, $order->id_shop) +Hook::exec('actionOrderSlipAdd', [ 'order' => $order, 'productList' => $orderRefundSummary->getProductRefunds(), 'qtyList' => $fullQuantityList, 'orderSlipCreated' => $this->orderSlipCreated, ], null, false, true, false, $order->id_shop) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionOrderStatusPostUpdate.md b/modules/concepts/hooks/list-of-hooks/actionOrderStatusPostUpdate.md index 629438f6d6..c3a44d5e1e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOrderStatusPostUpdate.md +++ b/modules/concepts/hooks/list-of-hooks/actionOrderStatusPostUpdate.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Post update of order status' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/order/OrderHistory.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/order/OrderHistory.php' file: classes/order/OrderHistory.php locations: - 'front office' @@ -12,7 +12,7 @@ type: action hookAliases: - postUpdateOrderStatus array_return: false -check_exceptions: false +check_exceptions: true chain: false origin: core description: 'Allows to be notified after order status is changed.' @@ -35,9 +35,5 @@ description: 'Allows to be notified after order status is changed.' ## Call of the Hook in the origin file ```php -Hook::exec('actionOrderStatusPostUpdate', [ - 'newOrderStatus' => $new_os, - 'oldOrderStatus' => $old_os, - 'id_order' => (int) $order->id, - ], null, false, true, false, $order->id_shop) +Hook::exec('actionOrderStatusPostUpdate', [ 'newOrderStatus' => $new_os, 'oldOrderStatus' => $old_os, 'id_order' => (int) $order->id, ], null, false, true, false, $order->id_shop) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionOrderStatusUpdate.md b/modules/concepts/hooks/list-of-hooks/actionOrderStatusUpdate.md index 6dadf78a63..d6d08d9d59 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOrderStatusUpdate.md +++ b/modules/concepts/hooks/list-of-hooks/actionOrderStatusUpdate.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Order status update - Event' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/order/OrderHistory.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/order/OrderHistory.php' file: classes/order/OrderHistory.php locations: - 'front office' @@ -12,7 +12,7 @@ type: action hookAliases: - updateOrderStatus array_return: false -check_exceptions: false +check_exceptions: true chain: false origin: core description: 'This hook launches modules when the status of an order changes' @@ -35,9 +35,5 @@ description: 'This hook launches modules when the status of an order changes' ## Call of the Hook in the origin file ```php -Hook::exec('actionOrderStatusUpdate', [ - 'newOrderStatus' => $new_os, - 'oldOrderStatus' => $old_os, - 'id_order' => (int) $order->id, - ], null, false, true, false, $order->id_shop) +Hook::exec('actionOrderStatusUpdate', [ 'newOrderStatus' => $new_os, 'oldOrderStatus' => $old_os, 'id_order' => (int) $order->id, ], null, false, true, false, $order->id_shop) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionOutputHTMLBefore.md b/modules/concepts/hooks/list-of-hooks/actionOutputHTMLBefore.md index b7a354d392..786c4fcb06 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOutputHTMLBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionOutputHTMLBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Before HTML output' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/FrontController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/FrontController.php' file: classes/controller/FrontController.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionOverrideEmployeeImage.md b/modules/concepts/hooks/list-of-hooks/actionOverrideEmployeeImage.md index 4a1497f9e8..a0351eb54e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOverrideEmployeeImage.md +++ b/modules/concepts/hooks/list-of-hooks/actionOverrideEmployeeImage.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Get Employee Image' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Employee.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Employee.php' file: classes/Employee.php locations: - 'front office' @@ -23,11 +23,10 @@ description: 'This hook is used to get the employee image' ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionOverrideEmployeeImage', +'actionOverrideEmployeeImage', [ 'employee' => $this, 'imageUrl' => &$imageUrl, ] - ) + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionOverrideShippingFreePrice.md b/modules/concepts/hooks/list-of-hooks/actionOverrideShippingFreePrice.md index e09f83ccf4..b4c8dafb10 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOverrideShippingFreePrice.md +++ b/modules/concepts/hooks/list-of-hooks/actionOverrideShippingFreePrice.md @@ -23,5 +23,5 @@ description: 'Allows modules to override the free shipping price and return thei ## Call of the Hook in the origin file ```php -Hook::exec('actionOverrideShippingFreePrice', ['shippingFreePrice' => &$shippingFreePrice, 'id_zone' => $id_zone, 'id_currency' => $this->id_currency]); +Hook::exec('actionOverrideShippingFreePrice', ['shippingFreePrice' => &$shippingFreePrice, 'id_zone' => $id_zone, 'id_currency' => $this->id_currency]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionOverrideShippingFreeWeight.md b/modules/concepts/hooks/list-of-hooks/actionOverrideShippingFreeWeight.md index f7c9305105..65c5d4db3d 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOverrideShippingFreeWeight.md +++ b/modules/concepts/hooks/list-of-hooks/actionOverrideShippingFreeWeight.md @@ -23,5 +23,5 @@ description: 'Allows modules to override the free shipping weight and return the ## Call of the Hook in the origin file ```php -Hook::exec('actionOverrideShippingFreeWeight', ['shippingFreeWeight' => &$shippingFreeWeight, 'id_zone' => $id_zone, 'id_currency' => $this->id_currency]); +Hook::exec('actionOverrideShippingFreeWeight', ['shippingFreeWeight' => &$shippingFreeWeight, 'id_zone' => $id_zone, 'id_currency' => $this->id_currency]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionPDFInvoiceRender.md b/modules/concepts/hooks/list-of-hooks/actionPDFInvoiceRender.md index 0d50ffe81d..2b1b41a847 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPDFInvoiceRender.md +++ b/modules/concepts/hooks/list-of-hooks/actionPDFInvoiceRender.md @@ -1,10 +1,25 @@ --- Title: actionPDFInvoiceRender hidden: true -hookTitle: +hookTitle: 'PDF Invoice - Render' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/PDF/OrderInvoicePdfGenerator.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/PaymentModule.php' + file: classes/PaymentModule.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/order/OrderHistory.php' + file: classes/order/OrderHistory.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/admin/AdminPdfController.php' + file: controllers/admin/AdminPdfController.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/PdfInvoiceController.php' + file: controllers/front/PdfInvoiceController.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/PDF/InvoicePdfGenerator.php' + file: src/Adapter/PDF/InvoicePdfGenerator.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/PDF/OrderInvoicePdfGenerator.php' file: src/Adapter/PDF/OrderInvoicePdfGenerator.php locations: - 'front office' @@ -14,7 +29,7 @@ array_return: false check_exceptions: false chain: false origin: core -description: '' +description: 'This hook is called when a PDF invoice is rendered from the Front Office and the Back Office' --- diff --git a/modules/concepts/hooks/list-of-hooks/actionPasswordRenew.md b/modules/concepts/hooks/list-of-hooks/actionPasswordRenew.md index 7096aed06f..a8be81fbeb 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPasswordRenew.md +++ b/modules/concepts/hooks/list-of-hooks/actionPasswordRenew.md @@ -1,10 +1,10 @@ --- Title: actionPasswordRenew hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/front/PasswordController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/PasswordController.php' file: controllers/front/PasswordController.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionPaymentCCAdd.md b/modules/concepts/hooks/list-of-hooks/actionPaymentCCAdd.md index 7e0b08a132..a7e9252ec4 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPaymentCCAdd.md +++ b/modules/concepts/hooks/list-of-hooks/actionPaymentCCAdd.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Payment CC added' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/order/OrderPayment.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/order/OrderPayment.php' file: classes/order/OrderPayment.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionPaymentConfirmation.md b/modules/concepts/hooks/list-of-hooks/actionPaymentConfirmation.md index d515284f48..a4979d8213 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPaymentConfirmation.md +++ b/modules/concepts/hooks/list-of-hooks/actionPaymentConfirmation.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Payment confirmation' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/order/OrderHistory.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/order/OrderHistory.php' file: classes/order/OrderHistory.php locations: - 'front office' @@ -12,7 +12,7 @@ type: action hookAliases: - paymentConfirm array_return: false -check_exceptions: false +check_exceptions: true chain: false origin: core description: 'This hook displays new elements after the payment is validated' diff --git a/modules/concepts/hooks/list-of-hooks/actionPresentCart.md b/modules/concepts/hooks/list-of-hooks/actionPresentCart.md index 3dd0888c94..a47ef66fd5 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentCart.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentCart.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Cart Presenter' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Presenter/Cart/CartPresenter.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Presenter/Cart/CartPresenter.php' file: src/Adapter/Presenter/Cart/CartPresenter.php locations: - 'front office' @@ -23,7 +23,5 @@ description: 'This hook is called before a cart is presented' ## Call of the Hook in the origin file ```php -Hook::exec('actionPresentCart', - ['presentedCart' => &$result] - ) +Hook::exec('actionPresentCart', ['presentedCart' => &$cartLazyArray] ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionPresentCategory.md b/modules/concepts/hooks/list-of-hooks/actionPresentCategory.md index 3cf4b09a3b..01b63313c4 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentCategory.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentCategory.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Category Presenter' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/src/Adapter/Presenter/Category/CategoryPresenter.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Presenter/Category/CategoryPresenter.php' file: src/Adapter/Presenter/Category/CategoryPresenter.php locations: - 'front office' @@ -23,7 +23,5 @@ description: 'This hook is called before a category is presented' ## Call of the Hook in the origin file ```php -Hook::exec('actionPresentCategory', - ['presentedCategory' => &$categoryLazyArray] - ); +Hook::exec('actionPresentCategory', ['presentedCategory' => &$categoryLazyArray] ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionPresentManufacturer.md b/modules/concepts/hooks/list-of-hooks/actionPresentManufacturer.md index ff948337bc..e279f9cbab 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentManufacturer.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentManufacturer.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Manufacturer Presenter' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/src/Adapter/Presenter/Manufacturer/ManufacturerPresenter.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Presenter/Manufacturer/ManufacturerPresenter.php' file: src/Adapter/Presenter/Manufacturer/ManufacturerPresenter.php locations: - 'front office' @@ -23,7 +23,5 @@ description: 'This hook is called before a manufacturer is presented' ## Call of the Hook in the origin file ```php -Hook::exec('actionPresentManufacturer', - ['presentedManufacturer' => &$manufacturerLazyArray] - ); +Hook::exec('actionPresentManufacturer', ['presentedManufacturer' => &$manufacturerLazyArray] ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionPresentModule.md b/modules/concepts/hooks/list-of-hooks/actionPresentModule.md index e83d9b8d58..734d0e039a 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentModule.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentModule.md @@ -1,10 +1,10 @@ --- Title: actionPresentModule hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Presenter/Module/ModulePresenter.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Presenter/Module/ModulePresenter.php' file: src/Adapter/Presenter/Module/ModulePresenter.php locations: - 'front office' @@ -23,7 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionPresentModule', - ['presentedModule' => &$result] - ) +Hook::exec('actionPresentModule', ['presentedModule' => &$result] ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionPresentObject.md b/modules/concepts/hooks/list-of-hooks/actionPresentObject.md index 283b58db4f..1ec2570d43 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentObject.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentObject.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Object Presenter' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/src/Adapter/Presenter/Object/ObjectPresenter.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Presenter/Object/ObjectPresenter.php' file: src/Adapter/Presenter/Object/ObjectPresenter.php locations: - 'front office' @@ -23,5 +23,5 @@ description: 'This hook is called before an object is presented' ## Call of the Hook in the origin file ```php -Hook::exec('actionPresentObject', ['presentedObject' => &$presentedObject, 'table' => $object::$definition['table']]); +Hook::exec('actionPresentObject', ['presentedObject' => &$presentedObject, 'table' => $object::$definition['table']]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionPresentOrder.md b/modules/concepts/hooks/list-of-hooks/actionPresentOrder.md index e387d01677..3774c27506 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentOrder.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentOrder.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Order Presenter' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Presenter/Order/OrderPresenter.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Presenter/Order/OrderPresenter.php' file: src/Adapter/Presenter/Order/OrderPresenter.php locations: - 'front office' @@ -23,7 +23,5 @@ description: 'This hook is called before an order is presented' ## Call of the Hook in the origin file ```php -Hook::exec('actionPresentOrder', - ['presentedOrder' => &$orderLazyArray] - ) +Hook::exec('actionPresentOrder', ['presentedOrder' => &$orderLazyArray] ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionPresentOrderReturn.md b/modules/concepts/hooks/list-of-hooks/actionPresentOrderReturn.md index 022f73a926..3e8c98d499 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentOrderReturn.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentOrderReturn.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Order Return Presenter' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Presenter/Order/OrderReturnPresenter.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Presenter/Order/OrderReturnPresenter.php' file: src/Adapter/Presenter/Order/OrderReturnPresenter.php locations: - 'front office' @@ -23,7 +23,5 @@ description: 'This hook is called before an order return is presented' ## Call of the Hook in the origin file ```php -Hook::exec('actionPresentOrderReturn', - ['presentedOrderReturn' => &$orderReturnLazyArray] - ) +Hook::exec('actionPresentOrderReturn', ['presentedOrderReturn' => &$orderReturnLazyArray] ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionPresentPaymentOptions.md b/modules/concepts/hooks/list-of-hooks/actionPresentPaymentOptions.md index 31961bb309..0013525c05 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentPaymentOptions.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentPaymentOptions.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Payment options Presenter' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/checkout/PaymentOptionsFinder.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/checkout/PaymentOptionsFinder.php' file: classes/checkout/PaymentOptionsFinder.php locations: - 'front office' @@ -32,7 +32,5 @@ description: 'This hook is called before payment options are presented' ## Call of the Hook in the origin file ```php -Hook::exec('actionPresentPaymentOptions', - ['paymentOptions' => &$paymentOptions] - ) +Hook::exec('actionPresentPaymentOptions', ['paymentOptions' => &$paymentOptions] ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionPresentProduct.md b/modules/concepts/hooks/list-of-hooks/actionPresentProduct.md index f2a89d8868..84add1c46f 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentProduct.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentProduct.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Product Presenter' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Presenter/Product/ProductPresenter.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Presenter/Product/ProductPresenter.php' file: src/Adapter/Presenter/Product/ProductPresenter.php locations: - 'front office' @@ -23,9 +23,7 @@ description: 'This hook is called before a product is presented' ## Call of the Hook in the origin file ```php -Hook::exec('actionPresentProduct', - ['presentedProduct' => &$productLazyArray] - ) +Hook::exec('actionPresentProduct', ['presentedProduct' => &$productLazyArray] ) ``` ## Example on how to change values diff --git a/modules/concepts/hooks/list-of-hooks/actionPresentProductListing.md b/modules/concepts/hooks/list-of-hooks/actionPresentProductListing.md index f4e14c4063..54ae57e2bb 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentProductListing.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentProductListing.md @@ -4,7 +4,10 @@ hidden: true hookTitle: 'Product Listing Presenter' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Presenter/Product/ProductListingPresenter.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Presenter/Cart/CartProductPresenter.php' + file: src/Adapter/Presenter/Cart/CartProductPresenter.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Presenter/Product/ProductListingPresenter.php' file: src/Adapter/Presenter/Product/ProductListingPresenter.php locations: - 'front office' @@ -23,7 +26,5 @@ description: 'This hook is called before a product listing is presented' ## Call of the Hook in the origin file ```php -Hook::exec('actionPresentProductListing', - ['presentedProduct' => &$productListingLazyArray] - ) +Hook::exec('actionPresentProductListing', ['presentedProduct' => &$cartProductLazyArray] ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionPresentStore.md b/modules/concepts/hooks/list-of-hooks/actionPresentStore.md index 7f4544918f..fa87570c5e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentStore.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentStore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Store Presenter' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/src/Adapter/Presenter/Store/StorePresenter.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Presenter/Store/StorePresenter.php' file: src/Adapter/Presenter/Store/StorePresenter.php locations: - 'front office' @@ -23,7 +23,5 @@ description: 'This hook is called before a store is presented' ## Call of the Hook in the origin file ```php -Hook::exec('actionPresentStore', - ['presentedStore' => &$storeLazyArray] - ); +Hook::exec('actionPresentStore', ['presentedStore' => &$storeLazyArray] ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionPresentSupplier.md b/modules/concepts/hooks/list-of-hooks/actionPresentSupplier.md index dcfe09d7e6..1e42a09a65 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentSupplier.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentSupplier.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Supplier Presenter' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/src/Adapter/Presenter/Supplier/SupplierPresenter.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Presenter/Supplier/SupplierPresenter.php' file: src/Adapter/Presenter/Supplier/SupplierPresenter.php locations: - 'front office' @@ -23,7 +23,5 @@ description: 'This hook is called before a supplier is presented' ## Call of the Hook in the origin file ```php -Hook::exec('actionPresentSupplier', - ['presentedSupplier' => &$supplierLazyArray] - ); +Hook::exec('actionPresentSupplier', ['presentedSupplier' => &$supplierLazyArray] ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionProductAdd.md b/modules/concepts/hooks/list-of-hooks/actionProductAdd.md index 3a6dbe6cd4..540f4b55fe 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductAdd.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductAdd.md @@ -4,8 +4,8 @@ hidden: true hookTitle: 'Product creation' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Product/ProductDuplicator.php' - file: src/Adapter/Product/ProductDuplicator.php + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Product/Update/ProductDuplicator.php' + file: src/Adapter/Product/Update/ProductDuplicator.php locations: - 'front office' type: action @@ -24,8 +24,5 @@ description: 'This hook is displayed after a product is created' ## Call of the Hook in the origin file ```php -dispatchWithParameters( - 'actionProductAdd', - ['id_product_old' => $oldProductId, 'id_product' => $newProductId, 'product' => $newProduct] - ) +'actionProductAdd', ['id_product_old' => $oldProductId, 'id_product' => $newProductId, 'product' => $newProduct] ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionProductAttributeDelete.md b/modules/concepts/hooks/list-of-hooks/actionProductAttributeDelete.md index 6d08d21f42..3a2ce3f056 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductAttributeDelete.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductAttributeDelete.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Product attribute deletion' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Product.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Product.php' file: classes/Product.php locations: - 'front office' @@ -15,7 +15,7 @@ array_return: false check_exceptions: false chain: false origin: core -description: "This hook is displayed when a product's attribute is deleted" +description: 'This hook is displayed when a product''s attribute is deleted' --- diff --git a/modules/concepts/hooks/list-of-hooks/actionProductAttributeUpdate.md b/modules/concepts/hooks/list-of-hooks/actionProductAttributeUpdate.md index b5caa9bb8d..dda63d719d 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductAttributeUpdate.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductAttributeUpdate.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Product attribute update' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Product.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Product.php' file: classes/Product.php locations: - 'front office' @@ -15,7 +15,7 @@ array_return: false check_exceptions: false chain: false origin: core -description: "This hook is displayed when a product's attribute is updated" +description: 'This hook is displayed when a product''s attribute is updated' --- diff --git a/modules/concepts/hooks/list-of-hooks/actionProductCancel.md b/modules/concepts/hooks/list-of-hooks/actionProductCancel.md index 0109d8e0d7..48a68caf3e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductCancel.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductCancel.md @@ -4,7 +4,16 @@ hidden: true hookTitle: 'Product cancelled' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Order/CommandHandler/IssueStandardRefundHandler.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Order/CommandHandler/CancelOrderProductHandler.php' + file: src/Adapter/Order/CommandHandler/CancelOrderProductHandler.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Order/CommandHandler/IssuePartialRefundHandler.php' + file: src/Adapter/Order/CommandHandler/IssuePartialRefundHandler.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Order/CommandHandler/IssueReturnProductHandler.php' + file: src/Adapter/Order/CommandHandler/IssueReturnProductHandler.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Order/CommandHandler/IssueStandardRefundHandler.php' file: src/Adapter/Order/CommandHandler/IssueStandardRefundHandler.php locations: - 'front office' @@ -12,7 +21,7 @@ type: action hookAliases: - cancelProduct array_return: false -check_exceptions: false +check_exceptions: true chain: false origin: core description: 'This hook is called when you cancel a product in an order' @@ -24,5 +33,5 @@ description: 'This hook is called when you cancel a product in an order' ## Call of the Hook in the origin file ```php -Hook::exec('actionProductCancel', ['order' => $order, 'id_order_detail' => (int) $orderDetailId, 'cancel_quantity' => $productRefund['quantity'], 'action' => CancellationActionType::STANDARD_REFUND], null, false, true, false, $order->id_shop) +Hook::exec('actionProductCancel', ['order' => $order, 'id_order_detail' => (int) $orderDetail->id_order_detail, 'cancel_quantity' => $qty_cancel_product, 'action' => CancellationActionType::CANCEL_PRODUCT], null, false, true, false, $order->id_shop) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionProductCoverage.md b/modules/concepts/hooks/list-of-hooks/actionProductCoverage.md index 1ff81f15d0..be72082051 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductCoverage.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductCoverage.md @@ -1,10 +1,10 @@ --- Title: actionProductCoverage hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/stock/StockManager.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/stock/StockManager.php' file: classes/stock/StockManager.php locations: - 'front office' @@ -23,12 +23,10 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionProductCoverage', - [ - 'id_product' => $id_product, - 'id_product_attribute' => $id_product_attribute, - 'warehouse' => $warehouse, - ] - ) +'actionProductCoverage', + [ + 'id_product' => $id_product, + 'id_product_attribute' => $id_product_attribute, + 'warehouse' => $warehouse, + ] ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionProductDelete.md b/modules/concepts/hooks/list-of-hooks/actionProductDelete.md index 150cb6749e..72cf3f0a83 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductDelete.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductDelete.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Product deletion' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Product.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Product.php' file: classes/Product.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionProductOutOfStock.md b/modules/concepts/hooks/list-of-hooks/actionProductOutOfStock.md index f49ca0e19a..bd9f2b80f4 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductOutOfStock.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductOutOfStock.md @@ -1,7 +1,7 @@ --- Title: actionProductOutOfStock hidden: true -hookTitle: Out-of-stock product +hookTitle: 'Out-of-stock product' files: - theme: classic @@ -11,7 +11,6 @@ files: theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/catalog/product.tpl file: themes/hummingbird/templates/catalog/product.tpl - locations: - front office type: action diff --git a/modules/concepts/hooks/list-of-hooks/actionProductPriceCalculation.md b/modules/concepts/hooks/list-of-hooks/actionProductPriceCalculation.md index 854abeec12..e4e0777635 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductPriceCalculation.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductPriceCalculation.md @@ -4,17 +4,17 @@ hidden: true hookTitle: 'Product Price Calculation' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.1.x/classes/Product.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Product.php' file: classes/Product.php locations: - - 'back office' + - 'front office' type: action hookAliases: array_return: false check_exceptions: false chain: false origin: core -description: 'This hook is called into the priceCalculation method to be able to override the price calculatio' +description: 'This hook is called into the priceCalculation method to be able to override the price calculation' --- @@ -23,31 +23,5 @@ description: 'This hook is called into the priceCalculation method to be able to ## Call of the Hook in the origin file ```php -Hook::exec('actionProductPriceCalculation', [ - 'id_shop' => $id_shop, - 'id_product' => $id_product, - 'id_product_attribute' => $id_product_attribute, - 'id_customization' => $id_customization, - 'id_country' => $id_country, - 'id_state' => $id_state, - 'zip_code' => $zipcode, - 'id_currency' => $id_currency, - 'id_group' => $id_group, - 'id_cart' => $id_cart, - 'id_customer' => $id_customer, - 'use_customer_price' => $use_customer_price, - 'quantity' => $quantity, - 'real_quantity' => $real_quantity, - 'use_tax' => $use_tax, - 'decimals' => $decimals, - 'only_reduc' => $only_reduc, - 'use_reduc' => $use_reduc, - 'with_ecotax' => $with_ecotax, - 'specific_price' => &$specific_price, - 'use_group_reduction' => $use_group_reduction, - 'address' => $address, - 'context' => $context, - 'specific_price_reduction' => &$specific_price_reduction, - 'price' => &$price, -]); +Hook::exec('actionProductPriceCalculation', [ 'id_shop' => $id_shop, 'id_product' => $id_product, 'id_product_attribute' => $id_product_attribute, 'id_customization' => $id_customization, 'id_country' => $id_country, ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionProductSave.md b/modules/concepts/hooks/list-of-hooks/actionProductSave.md index 8047bbc49e..b29559ec86 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductSave.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductSave.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Saving products' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Product.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Product.php' file: classes/Product.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionProductSearchAfter.md b/modules/concepts/hooks/list-of-hooks/actionProductSearchAfter.md index 2cc5edac5b..3fbdcb0be8 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductSearchAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductSearchAfter.md @@ -4,9 +4,8 @@ hidden: true hookTitle: 'Event triggered after search product completed' files: - - module: blockwishlist - url: 'https://github.com/PrestaShop/blockwishlist/blob/master/controllers/front/view.php' - file: controllers/front/view.php + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/ProductListingFrontController.php' + file: classes/controller/ProductListingFrontController.php locations: - 'front office' type: action diff --git a/modules/concepts/hooks/list-of-hooks/actionProductSearchProviderRunQueryAfter.md b/modules/concepts/hooks/list-of-hooks/actionProductSearchProviderRunQueryAfter.md index e28119be0a..7b4db8e89c 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductSearchProviderRunQueryAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductSearchProviderRunQueryAfter.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Runs an action after ProductSearchProviderInterface::RunQuery()' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/ProductListingFrontController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/ProductListingFrontController.php' file: classes/controller/ProductListingFrontController.php locations: - 'front office' @@ -23,8 +23,5 @@ description: 'Required to return a previous state of an SQL query or/and to chan ## Call of the Hook in the origin file ```php -Hook::exec('actionProductSearchProviderRunQueryAfter', [ - 'query' => $query, - 'result' => $result, - ]) +Hook::exec('actionProductSearchProviderRunQueryAfter', [ 'query' => $query, 'result' => $result, ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionProductSearchProviderRunQueryBefore.md b/modules/concepts/hooks/list-of-hooks/actionProductSearchProviderRunQueryBefore.md index d8b4585ca5..df6d51d2be 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductSearchProviderRunQueryBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductSearchProviderRunQueryBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Runs an action before ProductSearchProviderInterface::RunQuery()' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/ProductListingFrontController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/ProductListingFrontController.php' file: classes/controller/ProductListingFrontController.php locations: - 'front office' @@ -23,7 +23,5 @@ description: 'Required to modify an SQL query before executing it' ## Call of the Hook in the origin file ```php -Hook::exec('actionProductSearchProviderRunQueryBefore', [ - 'query' => $query, - ]) +Hook::exec('actionProductSearchProviderRunQueryBefore', [ 'query' => $query, ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionProductUpdate.md b/modules/concepts/hooks/list-of-hooks/actionProductUpdate.md index be2e569ae2..d0053a092b 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductUpdate.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductUpdate.md @@ -4,8 +4,11 @@ hidden: true hookTitle: 'Product update' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Product/AdminProductWrapper.php' - file: src/Adapter/Product/AdminProductWrapper.php + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Product.php' + file: classes/Product.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/webservice/WebserviceSpecificManagementImages.php' + file: classes/webservice/WebserviceSpecificManagementImages.php locations: - 'back office' type: action @@ -24,5 +27,5 @@ description: 'This hook is displayed after a product has been updated' ## Call of the Hook in the origin file ```php -Hook::exec('actionProductUpdate', ['id_product' => (int) $product->id, 'product' => $product]) +Hook::exec('actionProductUpdate', ['id_product' => (int) $this->id, 'product' => $this]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionSearch.md b/modules/concepts/hooks/list-of-hooks/actionSearch.md index 2198ccee2e..d6c0fb16d5 100644 --- a/modules/concepts/hooks/list-of-hooks/actionSearch.md +++ b/modules/concepts/hooks/list-of-hooks/actionSearch.md @@ -1,10 +1,10 @@ --- Title: actionSearch hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Search/SearchProductSearchProvider.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Search/SearchProductSearchProvider.php' file: src/Adapter/Search/SearchProductSearchProvider.php locations: - 'front office' @@ -33,11 +33,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionSearch', [ - 'searched_query' => $queryString, - 'total' => $count, - - // deprecated since 1.7.x - 'expr' => $queryString, - ]) +Hook::exec('actionSearch', [ 'searched_query' => $queryString, 'total' => $count, // deprecated since 1.7.x 'expr' => $queryString, ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionSetInvoice.md b/modules/concepts/hooks/list-of-hooks/actionSetInvoice.md index 17f4820459..a546e1516d 100644 --- a/modules/concepts/hooks/list-of-hooks/actionSetInvoice.md +++ b/modules/concepts/hooks/list-of-hooks/actionSetInvoice.md @@ -1,10 +1,10 @@ --- Title: actionSetInvoice hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/order/Order.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/order/Order.php' file: classes/order/Order.php locations: - 'front office' @@ -34,9 +34,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionSetInvoice', [ - get_class($this) => $this, - get_class($order_invoice) => $order_invoice, - 'use_existing_payment' => (bool) $use_existing_payment, - ]) +$invoice_number = Hook::exec('actionSetInvoice', [ get_class($this) => $this, get_class($order_invoice) => $order_invoice, 'use_existing_payment' => (bool) $use_existing_payment, ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionShopDataDuplication.md b/modules/concepts/hooks/list-of-hooks/actionShopDataDuplication.md index 722bf0bd3e..a1e3157f38 100644 --- a/modules/concepts/hooks/list-of-hooks/actionShopDataDuplication.md +++ b/modules/concepts/hooks/list-of-hooks/actionShopDataDuplication.md @@ -1,11 +1,14 @@ --- Title: actionShopDataDuplication hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/shop/Shop.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/shop/Shop.php' file: classes/shop/Shop.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/admin/AdminShopController.php' + file: controllers/admin/AdminShopController.php locations: - 'front office' type: action @@ -33,8 +36,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionShopDataDuplication', [ - 'old_id_shop' => (int) $old_id, - 'new_id_shop' => (int) $this->id, - ], $m['id_module']) +$modules_list = Hook::getHookModuleExecList('actionShopDataDuplication') ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionSubmitAccountBefore.md b/modules/concepts/hooks/list-of-hooks/actionSubmitAccountBefore.md index 10390a2a9b..767b9d0a04 100644 --- a/modules/concepts/hooks/list-of-hooks/actionSubmitAccountBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionSubmitAccountBefore.md @@ -1,21 +1,24 @@ --- Title: actionSubmitAccountBefore hidden: true -hookTitle: +hookTitle: 'Before customer account creation' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/front/RegistrationController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/checkout/CheckoutPersonalInformationStep.php' + file: classes/checkout/CheckoutPersonalInformationStep.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/RegistrationController.php' file: controllers/front/RegistrationController.php locations: - 'front office' type: action hookAliases: - actionBeforeSubmitAccount -array_return: false +array_return: true check_exceptions: false chain: false origin: core -description: '' +description: 'This hook is called before a customer account creation' --- @@ -24,5 +27,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionSubmitAccountBefore', [], null, true) +Hook::exec('actionSubmitAccountBefore', [], null, true), function ($carry, $item) { return $carry && $item; }, true ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionSubmitCustomerAddressForm.md b/modules/concepts/hooks/list-of-hooks/actionSubmitCustomerAddressForm.md index 68b23f6387..3671b2a171 100644 --- a/modules/concepts/hooks/list-of-hooks/actionSubmitCustomerAddressForm.md +++ b/modules/concepts/hooks/list-of-hooks/actionSubmitCustomerAddressForm.md @@ -1,10 +1,10 @@ --- Title: actionSubmitCustomerAddressForm hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/form/CustomerAddressForm.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/form/CustomerAddressForm.php' file: classes/form/CustomerAddressForm.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionUpdateCartAddress.md b/modules/concepts/hooks/list-of-hooks/actionUpdateCartAddress.md index 716ba55322..0a60fc069d 100644 --- a/modules/concepts/hooks/list-of-hooks/actionUpdateCartAddress.md +++ b/modules/concepts/hooks/list-of-hooks/actionUpdateCartAddress.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Triggers after changing address on the cart' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/classes/Cart.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Cart.php' file: classes/Cart.php locations: - 'front office' @@ -23,5 +23,5 @@ description: 'This hook is called after address is changed on the cart' ## Call of the Hook in the origin file ```php -Hook::exec('actionUpdateCartAddress', ['cart' => $this, 'oldAddressId' => $currentAddressId, 'newAddressId' => $newAddressId]); +Hook::exec('actionUpdateCartAddress', ['cart' => $this, 'oldAddressId' => (int) $id_address, 'newAddressId' => (int) $id_address_new]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionUpdateLangAfter.md b/modules/concepts/hooks/list-of-hooks/actionUpdateLangAfter.md index be976ce859..47deb7deb3 100644 --- a/modules/concepts/hooks/list-of-hooks/actionUpdateLangAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionUpdateLangAfter.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Update "lang" tables' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Language.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Language.php' file: classes/Language.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionUpdateQuantity.md b/modules/concepts/hooks/list-of-hooks/actionUpdateQuantity.md index 38f53d83b9..4d7ccf829d 100644 --- a/modules/concepts/hooks/list-of-hooks/actionUpdateQuantity.md +++ b/modules/concepts/hooks/list-of-hooks/actionUpdateQuantity.md @@ -4,8 +4,17 @@ hidden: true hookTitle: 'Quantity update' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/stock/StockAvailable.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/stock/StockAvailable.php' file: classes/stock/StockAvailable.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Product/Combination/Update/CombinationStockUpdater.php' + file: src/Adapter/Product/Combination/Update/CombinationStockUpdater.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Product/Stock/Update/ProductStockUpdater.php' + file: src/Adapter/Product/Stock/Update/ProductStockUpdater.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Core/Stock/StockManager.php' + file: src/Core/Stock/StockManager.php locations: - 'front office' type: action @@ -21,27 +30,13 @@ description: 'Quantity is updated only when a customer effectively places their {{% hookDescriptor %}} -## Parameters details - -```php - (int) Product ID, - 'id_product_attribute' => (int) Product attribute ID, - 'quantity' => (int) New product quantity - ); -``` - ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionUpdateQuantity', - [ - 'id_product' => $id_product, - 'id_product_attribute' => 0, - 'quantity' => $product_quantity, - 'id_shop' => $id_shop, - ] - ) +'actionUpdateQuantity', + [ + 'id_product' => $id_product, + 'id_product_attribute' => $id_product_attribute, + 'quantity' => $stock_available->quantity, + 'delta_quantity' => $deltaQuantity ?? null, ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionValidateCartRule.md b/modules/concepts/hooks/list-of-hooks/actionValidateCartRule.md index 1990d082e7..41c5b746e1 100644 --- a/modules/concepts/hooks/list-of-hooks/actionValidateCartRule.md +++ b/modules/concepts/hooks/list-of-hooks/actionValidateCartRule.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Alter cart rule validation process' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/classes/CartRule.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/CartRule.php' file: classes/CartRule.php locations: - 'front office' @@ -23,17 +23,10 @@ description: 'Allow modules to implement their own rules to validate a cart rule ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionValidateCartRule', +'actionValidateCartRule', [ 'cart_rule' => $this, 'cart' => $cart, 'alreadyInCart' => $alreadyInCart, 'display_error' => $display_error, - 'check_carrier' => $check_carrier, - 'useOrderPrices' => $useOrderPrices, - 'isValidatedByModules' => &$isValidatedByModules, - 'isValidatedByModulesError' => &$isValidatedByModulesError, - ] - ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionValidateCustomerAddressForm.md b/modules/concepts/hooks/list-of-hooks/actionValidateCustomerAddressForm.md index d83ccf1b78..719bd93f8c 100644 --- a/modules/concepts/hooks/list-of-hooks/actionValidateCustomerAddressForm.md +++ b/modules/concepts/hooks/list-of-hooks/actionValidateCustomerAddressForm.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Customer address form validation' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/form/CustomerAddressForm.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/form/CustomerAddressForm.php' file: classes/form/CustomerAddressForm.php locations: - 'front office' @@ -32,5 +32,5 @@ description: 'This hook is called when a customer submit its address form' ## Call of the Hook in the origin file ```php -Hook::exec('actionValidateCustomerAddressForm', ['form' => $this]) +if ($is_valid && Hook::exec('actionValidateCustomerAddressForm', ['form' => $this]) === false) { $is_valid = false; } return $is_valid && parent::validate() ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionValidateOrder.md b/modules/concepts/hooks/list-of-hooks/actionValidateOrder.md index 907d107383..78bd570688 100644 --- a/modules/concepts/hooks/list-of-hooks/actionValidateOrder.md +++ b/modules/concepts/hooks/list-of-hooks/actionValidateOrder.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'New orders' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/PaymentModule.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/PaymentModule.php' file: classes/PaymentModule.php locations: - 'front office' @@ -38,13 +38,7 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionValidateOrder', [ - 'cart' => $this->context->cart, - 'order' => $order, - 'customer' => $this->context->customer, - 'currency' => $this->context->currency, - 'orderStatus' => $order_status, - ]) +Hook::exec('actionValidateOrder', [ 'cart' => $this->context->cart, 'order' => $order, 'customer' => $this->context->customer, 'currency' => $this->context->currency, 'orderStatus' => $order_status, ``` ## Example implementation diff --git a/modules/concepts/hooks/list-of-hooks/actionValidateOrderAfter.md b/modules/concepts/hooks/list-of-hooks/actionValidateOrderAfter.md index 96008fe277..36d7601dde 100644 --- a/modules/concepts/hooks/list-of-hooks/actionValidateOrderAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionValidateOrderAfter.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'After validating an order' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/PaymentModule.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/PaymentModule.php' file: classes/PaymentModule.php locations: - 'front office' @@ -37,15 +37,10 @@ description: 'This hook is called after validating an order by core' ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionValidateOrderAfter', +'actionValidateOrderAfter', [ 'cart' => $this->context->cart, 'order' => $order ?? null, 'orders' => $order_list, 'customer' => $this->context->customer, - 'currency' => $this->context->currency, - 'orderStatus' => new OrderState(isset($order) ? $order->current_state : null), - ] - ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionValidateOrderBefore.md b/modules/concepts/hooks/list-of-hooks/actionValidateOrderBefore.md index 5f0f1bba9d..60c4c020ba 100644 --- a/modules/concepts/hooks/list-of-hooks/actionValidateOrderBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionValidateOrderBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Before validating an order' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/classes/PaymentModule.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/PaymentModule.php' file: classes/PaymentModule.php locations: - 'front office' @@ -23,11 +23,5 @@ description: 'This hook is called before validating an order by core' ## Call of the Hook in the origin file ```php -Hook::exec('actionValidateOrderBefore', [ - 'cart' => $this->context->cart, - 'customer' => $this->context->customer, - 'currency' => $this->context->currency, - 'id_order_state' => &$id_order_state, - 'payment_method' => $payment_method, - ]); +Hook::exec('actionValidateOrderBefore', [ 'cart' => $this->context->cart, 'customer' => $this->context->customer, 'currency' => $this->context->currency, 'id_order_state' => &$id_order_state, 'payment_method' => $payment_method, ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionValidateStepComplete.md b/modules/concepts/hooks/list-of-hooks/actionValidateStepComplete.md index c82b9fa29e..563a7d065c 100644 --- a/modules/concepts/hooks/list-of-hooks/actionValidateStepComplete.md +++ b/modules/concepts/hooks/list-of-hooks/actionValidateStepComplete.md @@ -1,10 +1,10 @@ --- Title: actionValidateStepComplete hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/checkout/CheckoutDeliveryStep.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/checkout/CheckoutDeliveryStep.php' file: classes/checkout/CheckoutDeliveryStep.php locations: - 'front office' @@ -34,13 +34,10 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionValidateStepComplete', +'actionValidateStepComplete', [ 'step_name' => 'delivery', 'request_params' => $requestParams, 'completed' => &$isComplete, ], - Module::getModuleIdByName($currentDeliveryOption['external_module_name']) - ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionWatermark.md b/modules/concepts/hooks/list-of-hooks/actionWatermark.md index a7a41a8e0f..7739fe5b84 100644 --- a/modules/concepts/hooks/list-of-hooks/actionWatermark.md +++ b/modules/concepts/hooks/list-of-hooks/actionWatermark.md @@ -1,10 +1,19 @@ --- Title: actionWatermark hidden: true -hookTitle: Watermark +hookTitle: 'Watermark' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Product/Image/Uploader/ProductImageUploader.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ImageManager.php' + file: classes/ImageManager.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/webservice/WebserviceSpecificManagementImages.php' + file: classes/webservice/WebserviceSpecificManagementImages.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Import/ImageCopier.php' + file: src/Adapter/Import/ImageCopier.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Product/Image/Uploader/ProductImageUploader.php' file: src/Adapter/Product/Image/Uploader/ProductImageUploader.php locations: - 'front office' @@ -21,21 +30,8 @@ description: '' {{% hookDescriptor %}} -## Parameters details - -```php - (int) Image ID, - 'id_product' => (int) Product ID - ); -``` - ## Call of the Hook in the origin file ```php -dispatchWithParameters( - 'actionWatermark', - ['id_image' => $imageId->getValue(), 'id_product' => $productId] - ) +Hook::exec('actionWatermark', ['id_image' => $id_image, 'id_product' => $id_entity]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionWishlistAddProduct.md b/modules/concepts/hooks/list-of-hooks/actionWishlistAddProduct.md index ba3538094a..fd6a727eab 100644 --- a/modules/concepts/hooks/list-of-hooks/actionWishlistAddProduct.md +++ b/modules/concepts/hooks/list-of-hooks/actionWishlistAddProduct.md @@ -1,12 +1,12 @@ --- Title: actionWishlistAddProduct hidden: true -hookTitle: +hookTitle: '' files: - module: blockwishlist url: 'https://github.com/PrestaShop/blockwishlist/blob/master/controllers/front/action.php' - file: modules/blockwishlist/controllers/front/action.php + file: controllers/front/action.php locations: - 'front office' type: action diff --git a/modules/concepts/hooks/list-of-hooks/addWebserviceResources.md b/modules/concepts/hooks/list-of-hooks/addWebserviceResources.md index 500042bece..ff99cc2d9a 100644 --- a/modules/concepts/hooks/list-of-hooks/addWebserviceResources.md +++ b/modules/concepts/hooks/list-of-hooks/addWebserviceResources.md @@ -4,14 +4,14 @@ hidden: true hookTitle: 'Add extra webservice resource' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/webservice/WebserviceRequest.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/webservice/WebserviceRequest.php' file: classes/webservice/WebserviceRequest.php locations: - 'front office' -type: null +type: action hookAliases: array_return: true -check_exceptions: true +check_exceptions: false chain: false origin: core description: 'This hook is called when webservice resources list in webservice controller' @@ -23,5 +23,5 @@ description: 'This hook is called when webservice resources list in webservice c ## Call of the Hook in the origin file ```php -Hook::exec('addWebserviceResources', ['resources' => $resources], null, true, false) +$extra_resources = Hook::exec('addWebserviceResources', ['resources' => $resources], null, true, false) ``` diff --git a/modules/concepts/hooks/list-of-hooks/additionalCustomerAddressFields.md b/modules/concepts/hooks/list-of-hooks/additionalCustomerAddressFields.md index 81a224eb29..8b7443499f 100644 --- a/modules/concepts/hooks/list-of-hooks/additionalCustomerAddressFields.md +++ b/modules/concepts/hooks/list-of-hooks/additionalCustomerAddressFields.md @@ -4,11 +4,15 @@ hidden: true hookTitle: 'Add fields to the Customer address form' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/form/CustomerAddressFormatter.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/form/CustomerAddressFormatter.php' file: classes/form/CustomerAddressFormatter.php + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/customer/_partials/block-address.tpl + file: themes/classic/templates/customer/_partials/block-address.tpl locations: - 'front office' -type: null +type: action hookAliases: array_return: true check_exceptions: false @@ -23,5 +27,5 @@ description: 'This hook returns an array of FormFields to add them to the custom ## Call of the Hook in the origin file ```php -Hook::exec('additionalCustomerAddressFields', ['fields' => &$format], null, true) +$additionalAddressFormFields = Hook::exec('additionalCustomerAddressFields', ['fields' => &$format], null, true) ``` diff --git a/modules/concepts/hooks/list-of-hooks/additionalCustomerFormFields.md b/modules/concepts/hooks/list-of-hooks/additionalCustomerFormFields.md index 97424a8a3a..2bce89e77e 100644 --- a/modules/concepts/hooks/list-of-hooks/additionalCustomerFormFields.md +++ b/modules/concepts/hooks/list-of-hooks/additionalCustomerFormFields.md @@ -4,11 +4,11 @@ hidden: true hookTitle: 'Add fields to the Customer form' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/form/CustomerFormatter.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/form/CustomerFormatter.php' file: classes/form/CustomerFormatter.php locations: - 'front office' -type: null +type: action hookAliases: array_return: true check_exceptions: false @@ -23,5 +23,5 @@ description: 'This hook returns an array of FormFields to add them to the custom ## Call of the Hook in the origin file ```php -Hook::exec('additionalCustomerFormFields', ['fields' => &$format], null, true) +$additionalCustomerFormFields = Hook::exec('additionalCustomerFormFields', ['fields' => &$format], null, true) ``` diff --git a/modules/concepts/hooks/list-of-hooks/dashboardData.md b/modules/concepts/hooks/list-of-hooks/dashboardData.md index 02e2cb14be..5fedac8715 100644 --- a/modules/concepts/hooks/list-of-hooks/dashboardData.md +++ b/modules/concepts/hooks/list-of-hooks/dashboardData.md @@ -1,14 +1,14 @@ --- Title: dashboardData hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/admin/AdminDashboardController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/admin/AdminDashboardController.php' file: controllers/admin/AdminDashboardController.php locations: - 'back office' -type: null +type: action hookAliases: array_return: true check_exceptions: false @@ -23,5 +23,10 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('dashboardData', $params, $id_module, true) +private const DASHBOARD_ALLOWED_HOOKS = ['dashboardData', 'dashboardZoneOne', 'dashboardZoneTwo', 'displayDashboardToolbarIcons', 'displayDashboardToolbarTopMenu', 'displayDashboardTop']; + + public function __construct() + { + $this->bootstrap = true; + $this->display = 'view'; ``` diff --git a/modules/concepts/hooks/list-of-hooks/dashboardZoneOne.md b/modules/concepts/hooks/list-of-hooks/dashboardZoneOne.md index a419119489..f540e35a9a 100644 --- a/modules/concepts/hooks/list-of-hooks/dashboardZoneOne.md +++ b/modules/concepts/hooks/list-of-hooks/dashboardZoneOne.md @@ -1,14 +1,14 @@ --- Title: dashboardZoneOne hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/admin/AdminDashboardController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/admin/AdminDashboardController.php' file: controllers/admin/AdminDashboardController.php locations: - 'back office' -type: null +type: action hookAliases: array_return: false check_exceptions: false @@ -23,5 +23,10 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('dashboardZoneOne', $params) +private const DASHBOARD_ALLOWED_HOOKS = ['dashboardData', 'dashboardZoneOne', 'dashboardZoneTwo', 'displayDashboardToolbarIcons', 'displayDashboardToolbarTopMenu', 'displayDashboardTop']; + + public function __construct() + { + $this->bootstrap = true; + $this->display = 'view'; ``` diff --git a/modules/concepts/hooks/list-of-hooks/dashboardZoneThree.md b/modules/concepts/hooks/list-of-hooks/dashboardZoneThree.md index 7f586222ca..52c31d0d19 100644 --- a/modules/concepts/hooks/list-of-hooks/dashboardZoneThree.md +++ b/modules/concepts/hooks/list-of-hooks/dashboardZoneThree.md @@ -4,11 +4,11 @@ hidden: true hookTitle: 'Dashboard column three' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/admin/AdminDashboardController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/admin/AdminDashboardController.php' file: controllers/admin/AdminDashboardController.php locations: - 'back office' -type: null +type: action hookAliases: array_return: false check_exceptions: false @@ -33,5 +33,5 @@ description: 'This hook is displayed in the third column of the dashboard' ## Call of the Hook in the origin file ```php -Hook::exec('dashboardZoneThree', $params) +'hookDashboardZoneThree' => Hook::exec('dashboardZoneThree', $params), 'action' => '#', 'warning' => $this->getWarningDomainName(), 'calendar' => $calendar_helper->generate(), 'PS_DASHBOARD_SIMULATION' => Configuration::get('PS_DASHBOARD_SIMULATION'), 'datepickerFrom' => Tools::getValue('datepickerFrom', $this->context->employee->stats_date_from), ``` diff --git a/modules/concepts/hooks/list-of-hooks/dashboardZoneTwo.md b/modules/concepts/hooks/list-of-hooks/dashboardZoneTwo.md index 521510fca9..461b1d5052 100644 --- a/modules/concepts/hooks/list-of-hooks/dashboardZoneTwo.md +++ b/modules/concepts/hooks/list-of-hooks/dashboardZoneTwo.md @@ -1,14 +1,14 @@ --- Title: dashboardZoneTwo hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/admin/AdminDashboardController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/admin/AdminDashboardController.php' file: controllers/admin/AdminDashboardController.php locations: - 'back office' -type: null +type: action hookAliases: array_return: false check_exceptions: false @@ -23,5 +23,10 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('dashboardZoneTwo', $params) +private const DASHBOARD_ALLOWED_HOOKS = ['dashboardData', 'dashboardZoneOne', 'dashboardZoneTwo', 'displayDashboardToolbarIcons', 'displayDashboardToolbarTopMenu', 'displayDashboardTop']; + + public function __construct() + { + $this->bootstrap = true; + $this->display = 'view'; ``` diff --git a/modules/concepts/hooks/list-of-hooks/deleteProductAttribute.md b/modules/concepts/hooks/list-of-hooks/deleteProductAttribute.md index ce5015c9d0..827372841d 100644 --- a/modules/concepts/hooks/list-of-hooks/deleteProductAttribute.md +++ b/modules/concepts/hooks/list-of-hooks/deleteProductAttribute.md @@ -1,14 +1,14 @@ --- Title: deleteProductAttribute hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Product.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Product.php' file: classes/Product.php locations: - 'front office' -type: null +type: action hookAliases: array_return: false check_exceptions: false @@ -23,12 +23,10 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec( - 'deleteProductAttribute', +'deleteProductAttribute', [ 'id_product_attribute' => $id_product_attribute, 'id_product' => $this->id, 'deleteAllAttributes' => false, ] - ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdditionalCustomerAddressFields.md b/modules/concepts/hooks/list-of-hooks/displayAdditionalCustomerAddressFields.md index 38e23e11c8..43670b9b42 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdditionalCustomerAddressFields.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdditionalCustomerAddressFields.md @@ -1,17 +1,16 @@ --- Title: displayAdditionalCustomerAddressFields hidden: true -hookTitle: Display additional customer address fields +hookTitle: 'Display additional customer address fields' files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/customer/_partials/block-address.tpl - file: themes/classic/templates/customer/_partials/block-address.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/customer/_partials/block-address.tpl file: themes/hummingbird/templates/customer/_partials/block-address.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/customer/_partials/block-address.tpl + file: themes/classic/templates/customer/_partials/block-address.tpl locations: - front office type: display @@ -29,5 +28,5 @@ description: This hook allows to display extra field values added in an address ## Call of the Hook in the origin file ```php -{hook h='displayAdditionalCustomerAddressFields' address=$address} +{capture name='displayAdditionalCustomerAddressFields'}{hook h='displayAdditionalCustomerAddressFields' address=$address}{/capture} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAddressSelectorBottom.md b/modules/concepts/hooks/list-of-hooks/displayAddressSelectorBottom.md index fee34614e5..5e56a6417b 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAddressSelectorBottom.md +++ b/modules/concepts/hooks/list-of-hooks/displayAddressSelectorBottom.md @@ -1,12 +1,16 @@ --- Title: displayAddressSelectorBottom hidden: true -hookTitle: +hookTitle: 'After address selection on checkout page' files: - - theme: Classic - url: 'https://github.com/PrestaShop/classic-theme/blob/develop/templates/checkout/_partials/steps/addresses.tpl' - file: 'Classic Theme: templates/checkout/_partials/steps/addresses.tpl' + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/checkout/_partials/steps/addresses.tpl + file: themes/hummingbird/templates/checkout/_partials/steps/addresses.tpl + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/checkout/_partials/steps/addresses.tpl + file: themes/classic/templates/checkout/_partials/steps/addresses.tpl locations: - 'front office' type: display @@ -25,5 +29,5 @@ description: '' ## Call of the Hook in the origin file ```php -{hook h='displayAddressSelectorBottom'} +{capture name="address_selector_bottom"}{hook h='displayAddressSelectorBottom'}{/capture} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminAfterHeader.md b/modules/concepts/hooks/list-of-hooks/displayAdminAfterHeader.md index f5b8d81343..eb1ed03b4a 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminAfterHeader.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminAfterHeader.md @@ -1,11 +1,23 @@ --- Title: displayAdminAfterHeader hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/admin-dev/themes/new-theme/template/light_display_layout.tpl' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/header.tpl' + file: admin-dev/themes/default/template/header.tpl + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/new-theme/template/layout.tpl' + file: admin-dev/themes/new-theme/template/layout.tpl + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/new-theme/template/light_display_layout.tpl' file: admin-dev/themes/new-theme/template/light_display_layout.tpl + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Layout/default_layout.html.twig' + file: src/PrestaShopBundle/Resources/views/Admin/Layout/default_layout.html.twig + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Layout/light_layout.html.twig' + file: src/PrestaShopBundle/Resources/views/Admin/Layout/light_layout.html.twig locations: - 'back office' type: display diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminCustomers.md b/modules/concepts/hooks/list-of-hooks/displayAdminCustomers.md index ec135bf145..cd9a7277dd 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminCustomers.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminCustomers.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Display new elements in the Back Office, tab AdminCustomers' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Customer/view.html.twig' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Customer/view.html.twig' file: src/PrestaShopBundle/Resources/views/Admin/Sell/Customer/view.html.twig locations: - 'back office' @@ -33,5 +33,10 @@ description: 'This hook launches modules when the AdminCustomers tab is displaye ## Call of the Hook in the origin file ```php -{{ renderhook('displayAdminCustomers', {'id_customer': customerInformation.customerId.value}) }} +{{ renderhook('displayAdminCustomers', {id_customer: customerInformation.customerId.value}) }} + +{% endblock %} + +{% block javascripts %} + {{ parent() }} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminEndContent.md b/modules/concepts/hooks/list-of-hooks/displayAdminEndContent.md index ffeb7ebe8c..28504c53df 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminEndContent.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminEndContent.md @@ -4,8 +4,20 @@ hidden: true hookTitle: 'Administration end of content' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/admin-dev/themes/new-theme/template/light_display_layout.tpl' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/footer.tpl' + file: admin-dev/themes/default/template/footer.tpl + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/new-theme/template/layout.tpl' + file: admin-dev/themes/new-theme/template/layout.tpl + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/new-theme/template/light_display_layout.tpl' file: admin-dev/themes/new-theme/template/light_display_layout.tpl + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Layout/default_layout.html.twig' + file: src/PrestaShopBundle/Resources/views/Admin/Layout/default_layout.html.twig + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Layout/light_layout.html.twig' + file: src/PrestaShopBundle/Resources/views/Admin/Layout/light_layout.html.twig locations: - 'back office' type: display diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminForm.md b/modules/concepts/hooks/list-of-hooks/displayAdminForm.md index 904faa0cad..4678ae9a05 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminForm.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminForm.md @@ -1,10 +1,10 @@ --- Title: displayAdminForm hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/admin-dev/themes/default/template/helpers/form/form.tpl' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/helpers/form/form.tpl' file: admin-dev/themes/default/template/helpers/form/form.tpl locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminGridTableAfter.md b/modules/concepts/hooks/list-of-hooks/displayAdminGridTableAfter.md index 9f39b20a7c..35b1adbe71 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminGridTableAfter.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminGridTableAfter.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Display after Grid table' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Resources/views/Admin/Common/Grid/Blocks/table.html.twig' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Common/Grid/Blocks/table.html.twig' file: src/PrestaShopBundle/Resources/views/Admin/Common/Grid/Blocks/table.html.twig locations: - 'back office' @@ -36,9 +36,9 @@ description: 'This hook adds new blocks after Grid component table' ```php {{ renderhook('displayAdminGridTableAfter', { - 'grid': grid, - 'legacy_controller': app.request.attributes.get('_legacy_controller'), - 'controller': app.request.attributes.get('_controller') + grid: grid, + legacy_controller: app.request.attributes.get('_legacy_controller'), + controller: app.request.attributes.get('_controller'), }) }} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminGridTableBefore.md b/modules/concepts/hooks/list-of-hooks/displayAdminGridTableBefore.md index ea1fb03124..cdc2e94cd9 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminGridTableBefore.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminGridTableBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Display before Grid table' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Resources/views/Admin/Common/Grid/Blocks/table.html.twig' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Common/Grid/Blocks/table.html.twig' file: src/PrestaShopBundle/Resources/views/Admin/Common/Grid/Blocks/table.html.twig locations: - 'back office' @@ -36,9 +36,9 @@ description: 'This hook adds new blocks before Grid component table' ```php {{ renderhook('displayAdminGridTableBefore', { - 'grid': grid, - 'legacy_controller': app.request.attributes.get('_legacy_controller'), - 'controller': app.request.attributes.get('_controller') + grid: grid, + legacy_controller: app.request.attributes.get('_legacy_controller'), + controller: app.request.attributes.get('_controller'), }) }} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminListAfter.md b/modules/concepts/hooks/list-of-hooks/displayAdminListAfter.md index d8d721609e..33d9667ca0 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminListAfter.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminListAfter.md @@ -1,10 +1,16 @@ --- Title: displayAdminListAfter hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/admin-dev/themes/default/template/helpers/list/list_footer.tpl' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/controllers/countries/helpers/list/list_footer.tpl' + file: admin-dev/themes/default/template/controllers/countries/helpers/list/list_footer.tpl + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/controllers/tax_rules/helpers/list/list_footer.tpl' + file: admin-dev/themes/default/template/controllers/tax_rules/helpers/list/list_footer.tpl + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/helpers/list/list_footer.tpl' file: admin-dev/themes/default/template/helpers/list/list_footer.tpl locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminListBefore.md b/modules/concepts/hooks/list-of-hooks/displayAdminListBefore.md index 9bb7a99cce..92e9c0e089 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminListBefore.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminListBefore.md @@ -1,10 +1,13 @@ --- Title: displayAdminListBefore hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/admin-dev/themes/default/template/helpers/list/list_header.tpl' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/controllers/tax_rules/helpers/list/list_header.tpl' + file: admin-dev/themes/default/template/controllers/tax_rules/helpers/list/list_header.tpl + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/helpers/list/list_header.tpl' file: admin-dev/themes/default/template/helpers/list/list_header.tpl locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminLogin.md b/modules/concepts/hooks/list-of-hooks/displayAdminLogin.md index dc78e2f688..e7207ac778 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminLogin.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminLogin.md @@ -4,7 +4,10 @@ hidden: true hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/src/PrestaShopBundle/Resources/views/Admin/Layout/login_layout.html.twig' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Hook.php' + file: classes/Hook.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Layout/login_layout.html.twig' file: src/PrestaShopBundle/Resources/views/Admin/Layout/login_layout.html.twig locations: - 'back office' @@ -23,5 +26,10 @@ description: '' ## Call of the Hook in the origin file ```php -{{ renderhook('displayAdminLogin') }}; +'displayAdminLogin', + ]); + + if ($useCache && Cache::isStored($cache_id)) { + return Cache::retrieve($cache_id); + } ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminNavBarBeforeEnd.md b/modules/concepts/hooks/list-of-hooks/displayAdminNavBarBeforeEnd.md index 37567c2111..83384897d7 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminNavBarBeforeEnd.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminNavBarBeforeEnd.md @@ -1,11 +1,20 @@ --- Title: displayAdminNavBarBeforeEnd hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/admin-dev/themes/new-theme/template/components/layout/nav_bar.tpl' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/nav.tpl' + file: admin-dev/themes/default/template/nav.tpl + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/new-theme/template/components/layout/nav_bar.tpl' file: admin-dev/themes/new-theme/template/components/layout/nav_bar.tpl + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Component/Layout/nav_bar.html.twig' + file: src/PrestaShopBundle/Resources/views/Admin/Component/Layout/nav_bar.html.twig + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Component/LegacyLayout/nav_bar.html.twig' + file: src/PrestaShopBundle/Resources/views/Admin/Component/LegacyLayout/nav_bar.html.twig locations: - 'back office' type: display diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminOptions.md b/modules/concepts/hooks/list-of-hooks/displayAdminOptions.md index e5a2233ae6..f0a2ebd6ae 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminOptions.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminOptions.md @@ -1,10 +1,10 @@ --- Title: displayAdminOptions hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/admin-dev/themes/default/template/helpers/options/options.tpl' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/helpers/options/options.tpl' file: admin-dev/themes/default/template/helpers/options/options.tpl locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminOrder.md b/modules/concepts/hooks/list-of-hooks/displayAdminOrder.md index 00fafab473..4d4951b721 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminOrder.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminOrder.md @@ -4,14 +4,14 @@ hidden: true hookTitle: 'Display new elements in the Back Office, tab AdminOrder' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/view.html.twig' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/view.html.twig' file: src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/view.html.twig locations: - 'back office' type: display +hasExample: true hookAliases: - adminOrder -hasExample: true array_return: false check_exceptions: false chain: false @@ -34,7 +34,12 @@ description: 'This hook launches modules when the AdminOrder tab is displayed in ## Call of the Hook in the origin file ```php -{{ renderhook('displayAdminOrder', {'id_order': orderForViewing.id}) }} +{{ renderhook('displayAdminOrder', {id_order: orderForViewing.id}) }} + + {{ include('@PrestaShop/Admin/Sell/Order/Order/Blocks/View/Modal/add_order_discount_modal.html.twig') }} + {{ include('@PrestaShop/Admin/Sell/Order/Order/Blocks/View/Modal/update_shipping_modal.html.twig') }} + {{ include('@PrestaShop/Admin/Sell/Order/Order/Blocks/View/Modal/split_shipment_modal.html.twig') }} + {{ include('@PrestaShop/Admin/Sell/Order/Order/Blocks/View/Modal/edit_shipping_modal.html.twig') }} ``` ## Example implementation diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminOrderCreateExtraButtons.md b/modules/concepts/hooks/list-of-hooks/displayAdminOrderCreateExtraButtons.md index 1ee403ee32..2009ab3682 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminOrderCreateExtraButtons.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminOrderCreateExtraButtons.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Add buttons on the create order page dropdown' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/Blocks/Create/summary.html.twig' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/Blocks/Create/summary.html.twig' file: src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/Blocks/Create/summary.html.twig locations: - 'back office' @@ -24,4 +24,9 @@ description: 'Add buttons on the create order page dropdown' ```php {{ renderhook('displayAdminOrderCreateExtraButtons') }} + + + + + ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminOrderMain.md b/modules/concepts/hooks/list-of-hooks/displayAdminOrderMain.md index 259e2dd744..a7202dd008 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminOrderMain.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminOrderMain.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Admin Order Main Column' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/view.html.twig' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/view.html.twig' file: src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/view.html.twig locations: - 'back office' @@ -33,7 +33,11 @@ description: 'This hook displays content in the order view page in the main colu ## Call of the Hook in the origin file ```php -{{ renderhook('displayAdminOrderMain', {'id_order': orderForViewing.id}) }} +{{ renderhook('displayAdminOrderMain', {id_order: orderForViewing.id}) }} + {{ include('@PrestaShop/Admin/Sell/Order/Order/Blocks/View/payments.html.twig') }} + {{ renderhook('displayAdminOrderMainBottom', {id_order: orderForViewing.id}) }} + + ``` ## Example implementation diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminOrderMainBottom.md b/modules/concepts/hooks/list-of-hooks/displayAdminOrderMainBottom.md index 8a268cb859..2767353571 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminOrderMainBottom.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminOrderMainBottom.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Admin Order Main Column Bottom' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/view.html.twig' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/view.html.twig' file: src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/view.html.twig locations: - 'back office' @@ -32,5 +32,10 @@ description: 'This hook displays content in the order view page at the bottom of ## Call of the Hook in the origin file ```php -{{ renderhook('displayAdminOrderMainBottom', {'id_order': orderForViewing.id}) }} +{{ renderhook('displayAdminOrderMainBottom', {id_order: orderForViewing.id}) }} + + + + {% if orderForViewing.sources.sources is not empty %} +
``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminOrderSide.md b/modules/concepts/hooks/list-of-hooks/displayAdminOrderSide.md index b7691035d2..507232ebca 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminOrderSide.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminOrderSide.md @@ -4,13 +4,13 @@ hidden: true hookTitle: 'Admin Order Side Column' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/view.html.twig' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/view.html.twig' file: src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/view.html.twig locations: - 'back office' type: display hookAliases: - - displayBackofficeOrderActions + - displayBackOfficeOrderActions array_return: false check_exceptions: false chain: false @@ -33,5 +33,10 @@ description: 'This hook displays content in the order view page in the side colu ## Call of the Hook in the origin file ```php -{{ renderhook('displayAdminOrderSide', {'id_order': orderForViewing.id}) }} +{{ renderhook('displayAdminOrderSide', {id_order: orderForViewing.id}) }} + {{ include('@PrestaShop/Admin/Sell/Order/Order/Blocks/View/messages.html.twig') }} + {{ renderhook('displayAdminOrderSideBottom', {id_order: orderForViewing.id}) }} +
+ +
``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminOrderSideBottom.md b/modules/concepts/hooks/list-of-hooks/displayAdminOrderSideBottom.md index f86b1926c5..4e56899b33 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminOrderSideBottom.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminOrderSideBottom.md @@ -1,10 +1,10 @@ --- Title: displayAdminOrderSideBottom hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/view.html.twig' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/view.html.twig' file: src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/view.html.twig locations: - 'back office' @@ -33,7 +33,12 @@ description: '' ## Call of the Hook in the origin file ```php -{{ renderhook('displayAdminOrderSideBottom', {'id_order': orderForViewing.id}) }} +{{ renderhook('displayAdminOrderSideBottom', {id_order: orderForViewing.id}) }} +
+ +
+
+ {{ include('@PrestaShop/Admin/Sell/Order/Order/Blocks/View/products.html.twig') }} ``` ## Example implementation diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminStatsModules.md b/modules/concepts/hooks/list-of-hooks/displayAdminStatsModules.md index 1d7f0cff81..7e7ee3e76a 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminStatsModules.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminStatsModules.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Stats - Modules' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/admin/AdminStatsTabController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/admin/AdminStatsTabController.php' file: controllers/admin/AdminStatsTabController.php locations: - 'back office' @@ -24,5 +24,10 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('displayAdminStatsModules', [], $module_instance->id) +$moduleList = Hook::getHookModuleExecList('displayAdminStatsModules'); + if (true === is_array($moduleList)) { + return array_map( + function ($moduleArray) { + return ['name' => $moduleArray['module']]; + }, ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminThemesListAfter.md b/modules/concepts/hooks/list-of-hooks/displayAdminThemesListAfter.md index 7580b83e9b..eda1af1c69 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminThemesListAfter.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminThemesListAfter.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'BO themes list extra content' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Resources/views/Admin/Improve/Design/Theme/index.html.twig' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Improve/Design/Theme/index.html.twig' file: src/PrestaShopBundle/Resources/views/Admin/Improve/Design/Theme/index.html.twig locations: - 'back office' @@ -32,5 +32,9 @@ description: 'This hook displays content after the themes list in the back offic ## Call of the Hook in the origin file ```php -{{ renderhook('displayAdminThemesListAfter', { 'current_theme_name': currentlyUsedTheme.get('name') }) }} +{{ renderhook('displayAdminThemesListAfter', {current_theme_name: currentlyUsedTheme.get('name')}) }} + + {{ include('@PrestaShop/Admin/Improve/Design/Theme/Blocks/layouts_configuration.html.twig') }} +
+
``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminView.md b/modules/concepts/hooks/list-of-hooks/displayAdminView.md index 5f039dfafb..8cf6d937b3 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminView.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminView.md @@ -1,10 +1,10 @@ --- Title: displayAdminView hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/admin-dev/themes/default/template/helpers/view/view.tpl' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/helpers/view/view.tpl' file: admin-dev/themes/default/template/helpers/view/view.tpl locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/displayAfterBodyOpeningTag.md b/modules/concepts/hooks/list-of-hooks/displayAfterBodyOpeningTag.md index 15a7690637..ba4351fb1b 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAfterBodyOpeningTag.md +++ b/modules/concepts/hooks/list-of-hooks/displayAfterBodyOpeningTag.md @@ -1,17 +1,16 @@ --- Title: displayAfterBodyOpeningTag hidden: true -hookTitle: Very top of pages +hookTitle: 'Very top of pages' files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-both-columns.tpl - file: themes/classic/templates/layouts/layout-both-columns.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/layouts/layout-both-columns.tpl file: themes/hummingbird/templates/layouts/layout-both-columns.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-both-columns.tpl + file: themes/classic/templates/layouts/layout-both-columns.tpl locations: - front office type: display diff --git a/modules/concepts/hooks/list-of-hooks/displayAfterCarrier.md b/modules/concepts/hooks/list-of-hooks/displayAfterCarrier.md index 4a2ee8514f..c7ddfddbe1 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAfterCarrier.md +++ b/modules/concepts/hooks/list-of-hooks/displayAfterCarrier.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'After carriers list' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/checkout/CheckoutDeliveryStep.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/checkout/CheckoutDeliveryStep.php' file: classes/checkout/CheckoutDeliveryStep.php locations: - 'front office' @@ -23,5 +23,5 @@ description: 'This hook is displayed after the carrier list in Front Office' ## Call of the Hook in the origin file ```php -Hook::exec('displayAfterCarrier', ['cart' => $this->getCheckoutSession()->getCart()]) +'hookDisplayAfterCarrier' => Hook::exec('displayAfterCarrier', ['cart' => $this->getCheckoutSession()->getCart()]), 'id_address' => $this->getCheckoutSession()->getIdAddressDelivery(), 'delivery_options' => $this->getCheckoutSession()->getDeliveryOptions(), 'delivery_option' => $this->getCheckoutSession()->getSelectedDeliveryOption(), 'recyclable' => $this->getCheckoutSession()->isRecyclable(), 'recyclablePackAllowed' => $this->isRecyclablePackAllowed(), ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAfterProductThumbs.md b/modules/concepts/hooks/list-of-hooks/displayAfterProductThumbs.md index 1b917d17f7..3f98e77a43 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAfterProductThumbs.md +++ b/modules/concepts/hooks/list-of-hooks/displayAfterProductThumbs.md @@ -1,7 +1,7 @@ --- Title: displayAfterProductThumbs hidden: true -hookTitle: Display extra content below product thumbs +hookTitle: 'Display extra content below product thumbs' files: - theme: classic @@ -11,7 +11,6 @@ files: theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/catalog/_partials/product-cover-thumbnails.tpl file: themes/hummingbird/templates/catalog/_partials/product-cover-thumbnails.tpl - locations: - front office type: display diff --git a/modules/concepts/hooks/list-of-hooks/displayAfterTitleTag.md b/modules/concepts/hooks/list-of-hooks/displayAfterTitleTag.md index 3e0658984a..9093a56046 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAfterTitleTag.md +++ b/modules/concepts/hooks/list-of-hooks/displayAfterTitleTag.md @@ -1,17 +1,16 @@ --- Title: displayAfterTitleTag hidden: true -hookTitle: After title tag +hookTitle: 'After title tag' files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/_partials/head.tpl - file: themes/classic/templates/_partials/head.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/_partials/head.tpl file: themes/hummingbird/templates/_partials/head.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/_partials/head.tpl + file: themes/classic/templates/_partials/head.tpl locations: - front office type: display diff --git a/modules/concepts/hooks/list-of-hooks/displayBackOfficeEmployeeMenu.md b/modules/concepts/hooks/list-of-hooks/displayBackOfficeEmployeeMenu.md index 04b8b58a5c..292e96bbf2 100644 --- a/modules/concepts/hooks/list-of-hooks/displayBackOfficeEmployeeMenu.md +++ b/modules/concepts/hooks/list-of-hooks/displayBackOfficeEmployeeMenu.md @@ -1,11 +1,14 @@ --- -Title: displaybackOfficeEmployeeMenu +Title: displayBackOfficeEmployeeMenu hidden: true hookTitle: 'Administration Employee menu' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Bridge/Smarty/HeaderConfigurator.php' - file: src/PrestaShopBundle/Bridge/Smarty/HeaderConfigurator.php + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' + file: classes/controller/AdminController.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Twig/Component/EmployeeDropdown.php' + file: src/PrestaShopBundle/Twig/Component/EmployeeDropdown.php locations: - 'back office' type: display @@ -38,5 +41,4 @@ dispatchWithParameters( 'links' => $menuLinksCollections, ] ) -``` - +``` \ No newline at end of file diff --git a/modules/concepts/hooks/list-of-hooks/displayBackOfficeFooter.md b/modules/concepts/hooks/list-of-hooks/displayBackOfficeFooter.md index 195870303f..499cc24263 100644 --- a/modules/concepts/hooks/list-of-hooks/displayBackOfficeFooter.md +++ b/modules/concepts/hooks/list-of-hooks/displayBackOfficeFooter.md @@ -4,12 +4,25 @@ hidden: true hookTitle: 'Administration panel footer' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/src/PrestaShopBundle/Resources/views/Admin/Component/Layout/footer.html.twig' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/footer.tpl' + file: admin-dev/themes/default/template/footer.tpl + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/new-theme/template/footer.tpl' + file: admin-dev/themes/new-theme/template/footer.tpl + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Hook.php' + file: classes/Hook.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Component/Layout/footer.html.twig' file: src/PrestaShopBundle/Resources/views/Admin/Component/Layout/footer.html.twig + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Layout/legacy_layout.html.twig' + file: src/PrestaShopBundle/Resources/views/Admin/Layout/legacy_layout.html.twig locations: - 'back office' type: display -hookAliases: displayBackOfficeFooter +hookAliases: + - backOfficeFooter array_return: false check_exceptions: false chain: false @@ -23,5 +36,5 @@ description: 'This hook is displayed within the admin panel''s footer' ## Call of the Hook in the origin file ```php -{{ renderhook('displayBackOfficeFooter') }}; +{hook h="displayBackOfficeFooter"} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayBackOfficeHeader.md b/modules/concepts/hooks/list-of-hooks/displayBackOfficeHeader.md index bf0393c962..0ad27ded0f 100644 --- a/modules/concepts/hooks/list-of-hooks/displayBackOfficeHeader.md +++ b/modules/concepts/hooks/list-of-hooks/displayBackOfficeHeader.md @@ -1,11 +1,20 @@ --- -Title: displaybackOfficeHeader +Title: displayBackOfficeHeader hidden: true hookTitle: 'Administration panel header' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/AdminController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Hook.php' + file: classes/Hook.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' file: classes/controller/AdminController.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Component/Layout/head_tag.html.twig' + file: src/PrestaShopBundle/Resources/views/Admin/Component/Layout/head_tag.html.twig + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Component/LegacyLayout/head_tag.html.twig' + file: src/PrestaShopBundle/Resources/views/Admin/Component/LegacyLayout/head_tag.html.twig locations: - 'back office' type: display @@ -24,6 +33,10 @@ description: 'This hook is displayed in the header of the admin panel' ## Call of the Hook in the origin file ```php -Hook::exec('displaybackOfficeHeader') -``` +'displayBackOfficeHeader', + 'displayAdminLogin', + ]); + if ($useCache && Cache::isStored($cache_id)) { + return Cache::retrieve($cache_id); +``` \ No newline at end of file diff --git a/modules/concepts/hooks/list-of-hooks/displayBackOfficeTop.md b/modules/concepts/hooks/list-of-hooks/displayBackOfficeTop.md index 064568f84e..28cf676a8b 100644 --- a/modules/concepts/hooks/list-of-hooks/displayBackOfficeTop.md +++ b/modules/concepts/hooks/list-of-hooks/displayBackOfficeTop.md @@ -1,11 +1,17 @@ --- -Title: displaybackOfficeTop +Title: displayBackOfficeTop hidden: true hookTitle: 'Administration panel hover the tabs' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/AdminController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' file: classes/controller/AdminController.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Layout/default_layout.html.twig' + file: src/PrestaShopBundle/Resources/views/Admin/Layout/default_layout.html.twig + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Layout/legacy_layout.html.twig' + file: src/PrestaShopBundle/Resources/views/Admin/Layout/legacy_layout.html.twig locations: - 'back office' type: display @@ -24,6 +30,5 @@ description: 'This hook is displayed on the roll hover of the tabs within the ad ## Call of the Hook in the origin file ```php -Hook::exec('displaybackOfficeTop') -``` - +'displayBackOfficeTop' => Hook::exec('displayBackOfficeTop'), 'displayBackOfficeEmployeeMenu' => $menuLinksCollections, 'submit_form_ajax' => (int) Tools::getValue('submitFormAjax'), ]) +``` \ No newline at end of file diff --git a/modules/concepts/hooks/list-of-hooks/displayBanner.md b/modules/concepts/hooks/list-of-hooks/displayBanner.md index bc2f08eccc..e7715197f7 100644 --- a/modules/concepts/hooks/list-of-hooks/displayBanner.md +++ b/modules/concepts/hooks/list-of-hooks/displayBanner.md @@ -1,17 +1,16 @@ --- Title: displayBanner hidden: true -hookTitle: Very top of pages +hookTitle: 'Very top of pages' files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/_partials/header.tpl - file: themes/classic/templates/_partials/header.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/_partials/header.tpl file: themes/hummingbird/templates/_partials/header.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/_partials/header.tpl + file: themes/classic/templates/_partials/header.tpl locations: - front office type: display @@ -29,5 +28,5 @@ description: Use this hook for banners on top of every pages ## Call of the Hook in the origin file ```php -{hook h='displayBanner'} +{capture name="header_banner"}{hook h='displayBanner'}{/capture} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayBeforeBodyClosingTag.md b/modules/concepts/hooks/list-of-hooks/displayBeforeBodyClosingTag.md index e7319740ee..e7c3246be1 100644 --- a/modules/concepts/hooks/list-of-hooks/displayBeforeBodyClosingTag.md +++ b/modules/concepts/hooks/list-of-hooks/displayBeforeBodyClosingTag.md @@ -1,17 +1,16 @@ --- Title: displayBeforeBodyClosingTag hidden: true -hookTitle: Very bottom of pages +hookTitle: 'Very bottom of pages' files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-both-columns.tpl - file: themes/classic/templates/layouts/layout-both-columns.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/layouts/layout-both-columns.tpl file: themes/hummingbird/templates/layouts/layout-both-columns.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-both-columns.tpl + file: themes/classic/templates/layouts/layout-both-columns.tpl locations: - front office type: display diff --git a/modules/concepts/hooks/list-of-hooks/displayBeforeCarrier.md b/modules/concepts/hooks/list-of-hooks/displayBeforeCarrier.md index 5c090362a6..2b8993ba6b 100644 --- a/modules/concepts/hooks/list-of-hooks/displayBeforeCarrier.md +++ b/modules/concepts/hooks/list-of-hooks/displayBeforeCarrier.md @@ -24,5 +24,5 @@ description: 'This hook is displayed before the carrier list in Front Office' ## Call of the Hook in the origin file ```php -Hook::exec('displayBeforeCarrier', ['cart' => $this->getCheckoutSession()->getCart()]) +'hookDisplayBeforeCarrier' => Hook::exec('displayBeforeCarrier', ['cart' => $this->getCheckoutSession()->getCart()]), 'hookDisplayAfterCarrier' => Hook::exec('displayAfterCarrier', ['cart' => $this->getCheckoutSession()->getCart()]), 'id_address' => $this->getCheckoutSession()->getIdAddressDelivery(), 'delivery_options' => $this->getCheckoutSession()->getDeliveryOptions(), 'delivery_option' => $this->getCheckoutSession()->getSelectedDeliveryOption(), 'recyclable' => $this->getCheckoutSession()->isRecyclable(), ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayCMSDisputeInformation.md b/modules/concepts/hooks/list-of-hooks/displayCMSDisputeInformation.md index 82f6267858..6eb88cbe2d 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCMSDisputeInformation.md +++ b/modules/concepts/hooks/list-of-hooks/displayCMSDisputeInformation.md @@ -3,15 +3,14 @@ Title: displayCMSDisputeInformation hidden: true hookTitle: displayCMSDisputeInformation files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/cms/page.tpl - file: themes/classic/templates/cms/page.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/cms/page.tpl file: themes/hummingbird/templates/cms/page.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/cms/page.tpl + file: themes/classic/templates/cms/page.tpl locations: - front office type: display diff --git a/modules/concepts/hooks/list-of-hooks/displayCMSPrintButton.md b/modules/concepts/hooks/list-of-hooks/displayCMSPrintButton.md index f91d0fc3ff..d87433c6e8 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCMSPrintButton.md +++ b/modules/concepts/hooks/list-of-hooks/displayCMSPrintButton.md @@ -3,15 +3,14 @@ Title: displayCMSPrintButton hidden: true hookTitle: displayCMSPrintButton files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/cms/page.tpl - file: themes/classic/templates/cms/page.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/cms/page.tpl file: themes/hummingbird/templates/cms/page.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/cms/page.tpl + file: themes/classic/templates/cms/page.tpl locations: - front office type: display diff --git a/modules/concepts/hooks/list-of-hooks/displayCarrierExtraContent.md b/modules/concepts/hooks/list-of-hooks/displayCarrierExtraContent.md index 2a79febf5e..913ec04d5e 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCarrierExtraContent.md +++ b/modules/concepts/hooks/list-of-hooks/displayCarrierExtraContent.md @@ -4,8 +4,11 @@ hidden: true hookTitle: 'Display additional content for a carrier (e.g pickup points)' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/classes/checkout/DeliveryOptionsFinder.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/checkout/DeliveryOptionsFinder.php' file: classes/checkout/DeliveryOptionsFinder.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Shipment/DeliveryOptionsProvider.php' + file: src/Adapter/Shipment/DeliveryOptionsProvider.php locations: - 'front office' type: display @@ -23,5 +26,5 @@ description: 'This hook calls only the module related to the carrier, in order t ## Call of the Hook in the origin file ```php -Hook::exec('displayCarrierExtraContent', ['carrier' => $carrier], $moduleId) +$carrier['extraContent'] = Hook::exec('displayCarrierExtraContent', ['carrier' => $carrier], $moduleId) ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayCartExtraProductActions.md b/modules/concepts/hooks/list-of-hooks/displayCartExtraProductActions.md index bc0bd4da79..4446711355 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCartExtraProductActions.md +++ b/modules/concepts/hooks/list-of-hooks/displayCartExtraProductActions.md @@ -1,7 +1,7 @@ --- Title: displayCartExtraProductActions hidden: true -hookTitle: Extra buttons in shopping cart +hookTitle: 'Extra buttons in shopping cart' files: - theme: classic @@ -11,10 +11,9 @@ files: theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/checkout/_partials/cart-detailed-product-line.tpl file: themes/hummingbird/templates/checkout/_partials/cart-detailed-product-line.tpl - locations: - front office -type: action +type: display hookAliases: origin: theme array_return: false diff --git a/modules/concepts/hooks/list-of-hooks/displayCartExtraProductInfo.md b/modules/concepts/hooks/list-of-hooks/displayCartExtraProductInfo.md index 2f5bb8f786..bf2a85759a 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCartExtraProductInfo.md +++ b/modules/concepts/hooks/list-of-hooks/displayCartExtraProductInfo.md @@ -4,8 +4,9 @@ hidden: true hookTitle: 'Extra information in shopping cart product line' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/themes/hummingbird/templates/checkout/_partials/cart-detailed-product-line.tpl' - file: themes/hummingbird/templates/checkout/_partials/cart-detailed-product-line.tpl + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/checkout/_partials/cart-detailed-product-line.tpl + file: themes/hummingbird/templates/checkout/_partials/cart-detailed-product-line.tpl locations: - 'front office' type: display @@ -13,7 +14,7 @@ hookAliases: array_return: false check_exceptions: false chain: false -origin: core +origin: theme description: 'This hook adds extra information to the product lines, in the shopping cart' --- @@ -23,5 +24,5 @@ description: 'This hook adds extra information to the product lines, in the shop ## Call of the Hook in the origin file ```php -{hook h='displayCartExtraProductInfo' product=$product}; +{hook h='displayCartExtraProductInfo' product=$product} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayCartModalContent.md b/modules/concepts/hooks/list-of-hooks/displayCartModalContent.md index 1dc23e0319..ee9bc42baa 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCartModalContent.md +++ b/modules/concepts/hooks/list-of-hooks/displayCartModalContent.md @@ -1,7 +1,7 @@ --- Title: displayCartModalContent hidden: true -hookTitle: Content of Add-to-cart modal +hookTitle: 'Content of Add-to-cart modal' files: - module: ps_shoppingcart diff --git a/modules/concepts/hooks/list-of-hooks/displayCartModalFooter.md b/modules/concepts/hooks/list-of-hooks/displayCartModalFooter.md index ca8261186a..455632caa8 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCartModalFooter.md +++ b/modules/concepts/hooks/list-of-hooks/displayCartModalFooter.md @@ -1,7 +1,7 @@ --- Title: displayCartModalFooter hidden: true -hookTitle: Bottom of Add-to-cart modal +hookTitle: 'Bottom of Add-to-cart modal' files: - module: ps_shoppingcart diff --git a/modules/concepts/hooks/list-of-hooks/displayCheckoutBeforeConfirmation.md b/modules/concepts/hooks/list-of-hooks/displayCheckoutBeforeConfirmation.md index 1293eeed35..4f1b1b982b 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCheckoutBeforeConfirmation.md +++ b/modules/concepts/hooks/list-of-hooks/displayCheckoutBeforeConfirmation.md @@ -1,17 +1,16 @@ --- Title: displayCheckoutBeforeConfirmation hidden: true -hookTitle: Show custom content before checkout confirmation +hookTitle: 'Show custom content before checkout confirmation' files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/checkout/_partials/steps/payment.tpl - file: themes/classic/templates/checkout/_partials/steps/payment.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/checkout/_partials/steps/payment.tpl file: themes/hummingbird/templates/checkout/_partials/steps/payment.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/checkout/_partials/steps/payment.tpl + file: themes/classic/templates/checkout/_partials/steps/payment.tpl locations: - front office type: display diff --git a/modules/concepts/hooks/list-of-hooks/displayCheckoutSubtotalDetails.md b/modules/concepts/hooks/list-of-hooks/displayCheckoutSubtotalDetails.md index a036420233..1213928485 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCheckoutSubtotalDetails.md +++ b/modules/concepts/hooks/list-of-hooks/displayCheckoutSubtotalDetails.md @@ -4,22 +4,13 @@ hidden: true hookTitle: displayCheckoutSubtotalDetails files: - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/modules/ps_shoppingcart/modal.tpl - file: themes/classic/modules/ps_shoppingcart/modal.tpl + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/checkout/_partials/cart-detailed-totals.tpl + file: themes/hummingbird/templates/checkout/_partials/cart-detailed-totals.tpl - theme: classic url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/checkout/_partials/cart-detailed-totals.tpl file: themes/classic/templates/checkout/_partials/cart-detailed-totals.tpl - - - theme: hummingbird - url: https://github.com/PrestaShop/hummingbird/blob/develop/modules/ps_shoppingcart/modal.tpl - file: themes/hummingbird/modules/ps_shoppingcart/modal.tpl - - - theme: hummingbird - url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/checkout/_partials/cart-detailed-totals.tpl - file: themes/hummingbird/templates/checkout/_partials/cart-detailed-totals.tpl - locations: - front office type: display @@ -37,5 +28,5 @@ description: ## Call of the Hook in the origin file ```php -{hook h='displayCheckoutSubtotalDetails' subtotal=$subtotal} +{hook h='displayCheckoutSubtotalDetails' subtotal=$subtotal} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayCheckoutSummaryTop.md b/modules/concepts/hooks/list-of-hooks/displayCheckoutSummaryTop.md index a6f37de68d..c59a7bcd82 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCheckoutSummaryTop.md +++ b/modules/concepts/hooks/list-of-hooks/displayCheckoutSummaryTop.md @@ -1,17 +1,16 @@ --- Title: displayCheckoutSummaryTop hidden: true -hookTitle: Cart summary top +hookTitle: 'Cart summary top' files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/checkout/_partials/cart-summary-top.tpl - file: themes/classic/templates/checkout/_partials/cart-summary-top.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/checkout/_partials/cart-summary-top.tpl file: themes/hummingbird/templates/checkout/_partials/cart-summary-top.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/checkout/_partials/cart-summary-top.tpl + file: themes/classic/templates/checkout/_partials/cart-summary-top.tpl locations: - front office type: display diff --git a/modules/concepts/hooks/list-of-hooks/displayContactContent.md b/modules/concepts/hooks/list-of-hooks/displayContactContent.md index b35ace890f..c573f056c9 100644 --- a/modules/concepts/hooks/list-of-hooks/displayContactContent.md +++ b/modules/concepts/hooks/list-of-hooks/displayContactContent.md @@ -1,17 +1,16 @@ --- Title: displayContactContent hidden: true -hookTitle: Content wrapper section of the contact page +hookTitle: 'Content wrapper section of the contact page' files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/contact.tpl - file: themes/classic/templates/contact.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/contact.tpl file: themes/hummingbird/templates/contact.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/contact.tpl + file: themes/classic/templates/contact.tpl locations: - front office type: display diff --git a/modules/concepts/hooks/list-of-hooks/displayContactLeftColumn.md b/modules/concepts/hooks/list-of-hooks/displayContactLeftColumn.md index 43788fdd9d..109d843dec 100644 --- a/modules/concepts/hooks/list-of-hooks/displayContactLeftColumn.md +++ b/modules/concepts/hooks/list-of-hooks/displayContactLeftColumn.md @@ -1,17 +1,16 @@ --- Title: displayContactLeftColumn hidden: true -hookTitle: Left column blocks on the contact page +hookTitle: 'Left column blocks on the contact page' files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/contact.tpl - file: themes/classic/templates/contact.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/contact.tpl file: themes/hummingbird/templates/contact.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/contact.tpl + file: themes/classic/templates/contact.tpl locations: - front office type: display diff --git a/modules/concepts/hooks/list-of-hooks/displayContactRightColumn.md b/modules/concepts/hooks/list-of-hooks/displayContactRightColumn.md index 1b59f70219..f22da4f67e 100644 --- a/modules/concepts/hooks/list-of-hooks/displayContactRightColumn.md +++ b/modules/concepts/hooks/list-of-hooks/displayContactRightColumn.md @@ -1,17 +1,16 @@ --- Title: displayContactRightColumn hidden: true -hookTitle: Right column blocks of the contact page +hookTitle: 'Right column blocks of the contact page' files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/contact.tpl - file: themes/classic/templates/contact.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/contact.tpl file: themes/hummingbird/templates/contact.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/contact.tpl + file: themes/classic/templates/contact.tpl locations: - front office type: display diff --git a/modules/concepts/hooks/list-of-hooks/displayContentWrapperBottom.md b/modules/concepts/hooks/list-of-hooks/displayContentWrapperBottom.md index 23a8ff9f06..e9004479f4 100644 --- a/modules/concepts/hooks/list-of-hooks/displayContentWrapperBottom.md +++ b/modules/concepts/hooks/list-of-hooks/displayContentWrapperBottom.md @@ -4,29 +4,53 @@ hidden: true hookTitle: 'Content wrapper section (bottom)' files: - - theme: Classic - url: 'https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-both-columns.tpl' - file: 'Classic Theme: templates/layouts/layout-both-columns.tpl' + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/index.tpl + file: themes/hummingbird/templates/index.tpl - - theme: Classic - url: 'https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-content-only.tpl' - file: 'Classic Theme: templates/layouts/layout-content-only.tpl' + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/layouts/layout-both-columns.tpl + file: themes/hummingbird/templates/layouts/layout-both-columns.tpl - - theme: Classic - url: 'https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-full-width.tpl' - file: 'Classic Theme: templates/layouts/layout-full-width.tpl' + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-both-columns.tpl + file: themes/classic/templates/layouts/layout-both-columns.tpl - - theme: Classic - url: 'https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-left-column.tpl' - file: 'Classic Theme: templates/layouts/layout-left-column.tpl' + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/layouts/layout-content-only.tpl + file: themes/hummingbird/templates/layouts/layout-content-only.tpl - - theme: Classic - url: 'https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-right-column.tpl' - file: 'Classic Theme: templates/layouts/layout-right-column.tpl' + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-content-only.tpl + file: themes/classic/templates/layouts/layout-content-only.tpl + - + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/layouts/layout-full-width.tpl + file: themes/hummingbird/templates/layouts/layout-full-width.tpl + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-full-width.tpl + file: themes/classic/templates/layouts/layout-full-width.tpl + - + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/layouts/layout-left-column.tpl + file: themes/hummingbird/templates/layouts/layout-left-column.tpl + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-left-column.tpl + file: themes/classic/templates/layouts/layout-left-column.tpl + - + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/layouts/layout-right-column.tpl + file: themes/hummingbird/templates/layouts/layout-right-column.tpl + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-right-column.tpl + file: themes/classic/templates/layouts/layout-right-column.tpl locations: - 'front office' type: display -hookAliases: +hookAliases: origin: theme array_return: false check_exceptions: false @@ -40,5 +64,5 @@ description: 'This hook displays new elements in the bottom of the content wrapp ## Call of the Hook in the origin file ```php -{hook h='displayContentWrapperBottom'} +{hook h="displayContentWrapperBottom"} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayContentWrapperTop.md b/modules/concepts/hooks/list-of-hooks/displayContentWrapperTop.md index 827b6fcfec..31567b8f12 100644 --- a/modules/concepts/hooks/list-of-hooks/displayContentWrapperTop.md +++ b/modules/concepts/hooks/list-of-hooks/displayContentWrapperTop.md @@ -4,29 +4,53 @@ hidden: true hookTitle: 'Content wrapper section (top)' files: - - theme: Classic - url: 'https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-both-columns.tpl' - file: 'Classic Theme: templates/layouts/layout-both-columns.tpl' + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/index.tpl + file: themes/hummingbird/templates/index.tpl - - theme: Classic - url: 'https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-content-only.tpl' - file: 'Classic Theme: templates/layouts/layout-content-only.tpl' + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/layouts/layout-both-columns.tpl + file: themes/hummingbird/templates/layouts/layout-both-columns.tpl - - theme: Classic - url: 'https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-full-width.tpl' - file: 'Classic Theme: templates/layouts/layout-full-width.tpl' + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-both-columns.tpl + file: themes/classic/templates/layouts/layout-both-columns.tpl - - theme: Classic - url: 'https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-left-column.tpl' - file: 'Classic Theme: templates/layouts/layout-left-column.tpl' + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/layouts/layout-content-only.tpl + file: themes/hummingbird/templates/layouts/layout-content-only.tpl - - theme: Classic - url: 'https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-right-column.tpl' - file: 'Classic Theme: templates/layouts/layout-right-column.tpl' + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-content-only.tpl + file: themes/classic/templates/layouts/layout-content-only.tpl + - + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/layouts/layout-full-width.tpl + file: themes/hummingbird/templates/layouts/layout-full-width.tpl + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-full-width.tpl + file: themes/classic/templates/layouts/layout-full-width.tpl + - + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/layouts/layout-left-column.tpl + file: themes/hummingbird/templates/layouts/layout-left-column.tpl + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-left-column.tpl + file: themes/classic/templates/layouts/layout-left-column.tpl + - + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/layouts/layout-right-column.tpl + file: themes/hummingbird/templates/layouts/layout-right-column.tpl + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-right-column.tpl + file: themes/classic/templates/layouts/layout-right-column.tpl locations: - 'front office' type: display -hookAliases: +hookAliases: origin: theme array_return: false check_exceptions: false @@ -40,5 +64,5 @@ description: 'This hook displays new elements in the top of the content wrapper' ## Call of the Hook in the origin file ```php -{hook h='displayContentWrapperTop'} +{hook h="displayContentWrapperTop"} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayCrossSellingShoppingCart.md b/modules/concepts/hooks/list-of-hooks/displayCrossSellingShoppingCart.md index ec8873c80a..a11fbfcea9 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCrossSellingShoppingCart.md +++ b/modules/concepts/hooks/list-of-hooks/displayCrossSellingShoppingCart.md @@ -3,15 +3,14 @@ Title: displayCrossSellingShoppingCart hidden: true hookTitle: displayCrossSellingShoppingCart files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/checkout/cart.tpl - file: themes/classic/templates/checkout/cart.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/checkout/cart.tpl file: themes/hummingbird/templates/checkout/cart.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/checkout/cart.tpl + file: themes/classic/templates/checkout/cart.tpl locations: - front office type: display diff --git a/modules/concepts/hooks/list-of-hooks/displayCustomerAccount.md b/modules/concepts/hooks/list-of-hooks/displayCustomerAccount.md index 5c784d3075..bb27654255 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCustomerAccount.md +++ b/modules/concepts/hooks/list-of-hooks/displayCustomerAccount.md @@ -1,12 +1,8 @@ --- Title: displayCustomerAccount hidden: true -hookTitle: Customer account displayed in Front Office +hookTitle: 'Customer account displayed in Front Office' files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/customer/my-account.tpl - file: themes/classic/templates/customer/my-account.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/components/account-menu.tpl @@ -15,7 +11,10 @@ files: theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/customer/my-account.tpl file: themes/hummingbird/templates/customer/my-account.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/customer/my-account.tpl + file: themes/classic/templates/customer/my-account.tpl locations: - front office type: display diff --git a/modules/concepts/hooks/list-of-hooks/displayCustomerAccountForm.md b/modules/concepts/hooks/list-of-hooks/displayCustomerAccountForm.md index 94849e81e8..3423f7a8bf 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCustomerAccountForm.md +++ b/modules/concepts/hooks/list-of-hooks/displayCustomerAccountForm.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Customer account creation form' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/form/CustomerForm.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/form/CustomerForm.php' file: classes/form/CustomerForm.php locations: - 'front office' @@ -24,5 +24,5 @@ description: 'This hook displays some information on the form to create a custom ## Call of the Hook in the origin file ```php -Hook::exec('displayCustomerAccountForm') +'hook_create_account_form' => Hook::exec('displayCustomerAccountForm'), 'formFields' => array_map( function (FormField $field) { return $field->toArray() ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayCustomerAccountFormTop.md b/modules/concepts/hooks/list-of-hooks/displayCustomerAccountFormTop.md index e3ae56602c..6b4392b688 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCustomerAccountFormTop.md +++ b/modules/concepts/hooks/list-of-hooks/displayCustomerAccountFormTop.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Block above the form for create an account' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/front/RegistrationController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/RegistrationController.php' file: controllers/front/RegistrationController.php locations: - 'front office' @@ -15,7 +15,7 @@ array_return: false check_exceptions: false chain: false origin: core -description: "This hook is displayed above the customer's account creation form" +description: 'This hook is displayed above the customer''s account creation form' --- @@ -24,5 +24,5 @@ description: "This hook is displayed above the customer's account creation form" ## Call of the Hook in the origin file ```php -Hook::exec('displayCustomerAccountFormTop') +'hook_create_account_top' => Hook::exec('displayCustomerAccountFormTop'), ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayCustomerAccountTop.md b/modules/concepts/hooks/list-of-hooks/displayCustomerAccountTop.md index 82c4f03cb1..386ed5ec0f 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCustomerAccountTop.md +++ b/modules/concepts/hooks/list-of-hooks/displayCustomerAccountTop.md @@ -4,8 +4,9 @@ hidden: true hookTitle: 'Customer account displayed in Front Office (Top part)' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/themes/hummingbird/templates/customer/my-account.tpl' - file: themes/hummingbird/templates/customer/my-account.tpl + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/customer/my-account.tpl + file: themes/hummingbird/templates/customer/my-account.tpl locations: - 'front office' type: display @@ -13,7 +14,7 @@ hookAliases: array_return: false check_exceptions: false chain: false -origin: core +origin: theme description: 'This hook displays new elements on the customer account page on Top' --- @@ -23,5 +24,5 @@ description: 'This hook displays new elements on the customer account page on To ## Call of the Hook in the origin file ```php -{hook h='displayCustomerAccountTop'}; +{hook h='displayCustomerAccountTop'} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayCustomerLoginFormAfter.md b/modules/concepts/hooks/list-of-hooks/displayCustomerLoginFormAfter.md index 89b02d9c33..46427140b6 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCustomerLoginFormAfter.md +++ b/modules/concepts/hooks/list-of-hooks/displayCustomerLoginFormAfter.md @@ -1,17 +1,16 @@ --- Title: displayCustomerLoginFormAfter hidden: true -hookTitle: Display elements after login form +hookTitle: 'Display elements after login form' files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/customer/authentication.tpl - file: themes/classic/templates/customer/authentication.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/customer/authentication.tpl file: themes/hummingbird/templates/customer/authentication.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/customer/authentication.tpl + file: themes/classic/templates/customer/authentication.tpl locations: - front office type: display diff --git a/modules/concepts/hooks/list-of-hooks/displayCustomization.md b/modules/concepts/hooks/list-of-hooks/displayCustomization.md index 0515c42906..e8694a568d 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCustomization.md +++ b/modules/concepts/hooks/list-of-hooks/displayCustomization.md @@ -1,10 +1,10 @@ --- Title: displayCustomization hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Product.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Product.php' file: classes/Product.php locations: - 'front office' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('displayCustomization', ['customization' => $row], (int) $row['id_module']) +$row['value'] = Hook::exec('displayCustomization', ['customization' => $row], (int) $row['id_module']) ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayDashboardToolbarIcons.md b/modules/concepts/hooks/list-of-hooks/displayDashboardToolbarIcons.md index 12879b04b7..0b41740f38 100644 --- a/modules/concepts/hooks/list-of-hooks/displayDashboardToolbarIcons.md +++ b/modules/concepts/hooks/list-of-hooks/displayDashboardToolbarIcons.md @@ -4,8 +4,8 @@ hidden: true hookTitle: 'Display new elements in back office page with dashboard, on icons list' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Resources/views/Admin/Product/CatalogPage/Blocks/tools.html.twig' - file: src/PrestaShopBundle/Resources/views/Admin/Product/CatalogPage/Blocks/tools.html.twig + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/admin/AdminDashboardController.php' + file: controllers/admin/AdminDashboardController.php locations: - 'back office' type: display @@ -23,5 +23,10 @@ description: 'This hook launches modules when the back office with dashboard is ## Call of the Hook in the origin file ```php -{{ renderhook('displayDashboardToolbarIcons', {}) }} +private const DASHBOARD_ALLOWED_HOOKS = ['dashboardData', 'dashboardZoneOne', 'dashboardZoneTwo', 'displayDashboardToolbarIcons', 'displayDashboardToolbarTopMenu', 'displayDashboardTop']; + + public function __construct() + { + $this->bootstrap = true; + $this->display = 'view'; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayDashboardToolbarTopMenu.md b/modules/concepts/hooks/list-of-hooks/displayDashboardToolbarTopMenu.md index d21c0e5bc0..673eebea4d 100644 --- a/modules/concepts/hooks/list-of-hooks/displayDashboardToolbarTopMenu.md +++ b/modules/concepts/hooks/list-of-hooks/displayDashboardToolbarTopMenu.md @@ -4,8 +4,20 @@ hidden: true hookTitle: 'Display new elements in back office page with a dashboard, on top Menu' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/admin-dev/themes/new-theme/template/page_header_toolbar.tpl' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/page_header_toolbar.tpl' + file: admin-dev/themes/default/template/page_header_toolbar.tpl + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/new-theme/template/page_header_toolbar.tpl' file: admin-dev/themes/new-theme/template/page_header_toolbar.tpl + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/admin/AdminDashboardController.php' + file: controllers/admin/AdminDashboardController.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Component/Layout/toolbar.html.twig' + file: src/PrestaShopBundle/Resources/views/Admin/Component/Layout/toolbar.html.twig + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Component/LegacyLayout/toolbar.html.twig' + file: src/PrestaShopBundle/Resources/views/Admin/Component/LegacyLayout/toolbar.html.twig locations: - 'back office' type: display diff --git a/modules/concepts/hooks/list-of-hooks/displayDashboardTop.md b/modules/concepts/hooks/list-of-hooks/displayDashboardTop.md index 40e9ca7b84..853a62712b 100644 --- a/modules/concepts/hooks/list-of-hooks/displayDashboardTop.md +++ b/modules/concepts/hooks/list-of-hooks/displayDashboardTop.md @@ -4,8 +4,20 @@ hidden: true hookTitle: 'Dashboard Top' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/admin-dev/themes/new-theme/template/page_header_toolbar.tpl' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/page_header_toolbar.tpl' + file: admin-dev/themes/default/template/page_header_toolbar.tpl + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/new-theme/template/page_header_toolbar.tpl' file: admin-dev/themes/new-theme/template/page_header_toolbar.tpl + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/admin/AdminDashboardController.php' + file: controllers/admin/AdminDashboardController.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Component/Layout/toolbar.html.twig' + file: src/PrestaShopBundle/Resources/views/Admin/Component/Layout/toolbar.html.twig + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Component/LegacyLayout/toolbar.html.twig' + file: src/PrestaShopBundle/Resources/views/Admin/Component/LegacyLayout/toolbar.html.twig locations: - 'back office' type: display @@ -14,7 +26,7 @@ array_return: false check_exceptions: false chain: false origin: core -description: "Displays the content in the dashboard's top area" +description: 'Displays the content in the dashboard''s top area' --- diff --git a/modules/concepts/hooks/list-of-hooks/displayEmptyModuleCategoryExtraMessage.md b/modules/concepts/hooks/list-of-hooks/displayEmptyModuleCategoryExtraMessage.md index 0a35ed78a3..f02305b4a8 100644 --- a/modules/concepts/hooks/list-of-hooks/displayEmptyModuleCategoryExtraMessage.md +++ b/modules/concepts/hooks/list-of-hooks/displayEmptyModuleCategoryExtraMessage.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Extra message to display for an empty modules category' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Resources/views/Admin/Module/Includes/grid_manage_empty.html.twig' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Module/Includes/grid_manage_empty.html.twig' file: src/PrestaShopBundle/Resources/views/Admin/Module/Includes/grid_manage_empty.html.twig locations: - 'back office' @@ -31,5 +31,10 @@ description: "This hook allows to add an extra message to display in the Module ## Call of the Hook in the origin file ```php -{{ renderhook('displayEmptyModuleCategoryExtraMessage', {'category_name': category.name}) }} +{% set hookData = renderhook('displayEmptyModuleCategoryExtraMessage', {category_name: category.name}) %} + {% if hookData is not empty %} +
+ {{ category.name|trans({}, 'Admin.Modules.Feature') }} +
+ {{ hookData|raw }} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayExpressCheckout.md b/modules/concepts/hooks/list-of-hooks/displayExpressCheckout.md index a72cba544f..1deffdf7ba 100644 --- a/modules/concepts/hooks/list-of-hooks/displayExpressCheckout.md +++ b/modules/concepts/hooks/list-of-hooks/displayExpressCheckout.md @@ -3,15 +3,14 @@ Title: displayExpressCheckout hidden: true hookTitle: displayExpressCheckout files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/checkout/_partials/cart-detailed-actions.tpl - file: themes/classic/templates/checkout/_partials/cart-detailed-actions.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/checkout/_partials/cart-detailed-actions.tpl file: themes/hummingbird/templates/checkout/_partials/cart-detailed-actions.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/checkout/_partials/cart-detailed-actions.tpl + file: themes/classic/templates/checkout/_partials/cart-detailed-actions.tpl locations: - front office type: display diff --git a/modules/concepts/hooks/list-of-hooks/displayFeatureForm.md b/modules/concepts/hooks/list-of-hooks/displayFeatureForm.md index 87603825d7..781bc477cd 100644 --- a/modules/concepts/hooks/list-of-hooks/displayFeatureForm.md +++ b/modules/concepts/hooks/list-of-hooks/displayFeatureForm.md @@ -4,7 +4,7 @@ hidden: true hookTitle: "Add fields to the form 'feature'" files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Catalog/Features/Blocks/form.html.twig' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Catalog/Features/Blocks/form.html.twig' file: src/PrestaShopBundle/Resources/views/Admin/Sell/Catalog/Features/Blocks/form.html.twig locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/displayFeaturePostProcess.md b/modules/concepts/hooks/list-of-hooks/displayFeaturePostProcess.md index e8535cfe1d..e860ed434a 100644 --- a/modules/concepts/hooks/list-of-hooks/displayFeaturePostProcess.md +++ b/modules/concepts/hooks/list-of-hooks/displayFeaturePostProcess.md @@ -2,10 +2,7 @@ Title: displayFeaturePostProcess hidden: true hookTitle: 'On post-process in admin feature' -files: - - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/admin/AdminFeaturesController.php' - file: controllers/admin/AdminFeaturesController.php +files: { } locations: - 'back office' type: display diff --git a/modules/concepts/hooks/list-of-hooks/displayFeatureValueForm.md b/modules/concepts/hooks/list-of-hooks/displayFeatureValueForm.md index 3d1348d2aa..76d2e4bb9b 100644 --- a/modules/concepts/hooks/list-of-hooks/displayFeatureValueForm.md +++ b/modules/concepts/hooks/list-of-hooks/displayFeatureValueForm.md @@ -2,10 +2,7 @@ Title: displayFeatureValueForm hidden: true hookTitle: "Add fields to the form 'feature value'" -files: - - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/admin-dev/themes/default/template/controllers/feature_value/helpers/form/form.tpl' - file: admin-dev/themes/default/template/controllers/feature_value/helpers/form/form.tpl +files: { } locations: - 'back office' type: display diff --git a/modules/concepts/hooks/list-of-hooks/displayFeatureValuePostProcess.md b/modules/concepts/hooks/list-of-hooks/displayFeatureValuePostProcess.md index 2a6cbb60a8..0b5da23c59 100644 --- a/modules/concepts/hooks/list-of-hooks/displayFeatureValuePostProcess.md +++ b/modules/concepts/hooks/list-of-hooks/displayFeatureValuePostProcess.md @@ -2,10 +2,7 @@ Title: displayFeatureValuePostProcess hidden: true hookTitle: 'On post-process in admin feature value' -files: - - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/admin/AdminFeaturesController.php' - file: controllers/admin/AdminFeaturesController.php +files: { } locations: - 'back office' type: display diff --git a/modules/concepts/hooks/list-of-hooks/displayFooter.md b/modules/concepts/hooks/list-of-hooks/displayFooter.md index d812edf0c3..6b8a59f912 100644 --- a/modules/concepts/hooks/list-of-hooks/displayFooter.md +++ b/modules/concepts/hooks/list-of-hooks/displayFooter.md @@ -1,17 +1,16 @@ --- Title: displayFooter hidden: true -hookTitle: Footer +hookTitle: 'Footer' files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/_partials/footer.tpl - file: themes/classic/templates/_partials/footer.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/_partials/footer.tpl file: themes/hummingbird/templates/_partials/footer.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/_partials/footer.tpl + file: themes/classic/templates/_partials/footer.tpl locations: - front office type: display @@ -30,5 +29,5 @@ description: This hook displays new blocks in the footer ## Call of the Hook in the origin file ```php -{hook h='displayFooter'} +{capture name="footer_main_top"}{hook h='displayFooter'}{/capture} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayFooterAfter.md b/modules/concepts/hooks/list-of-hooks/displayFooterAfter.md index 7ac4c66983..c45daa47eb 100644 --- a/modules/concepts/hooks/list-of-hooks/displayFooterAfter.md +++ b/modules/concepts/hooks/list-of-hooks/displayFooterAfter.md @@ -3,15 +3,14 @@ Title: displayFooterAfter hidden: true hookTitle: displayFooterAfter files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/_partials/footer.tpl - file: themes/classic/templates/_partials/footer.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/_partials/footer.tpl file: themes/hummingbird/templates/_partials/footer.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/_partials/footer.tpl + file: themes/classic/templates/_partials/footer.tpl locations: - front office type: display @@ -29,5 +28,5 @@ description: ## Call of the Hook in the origin file ```php -{hook h='displayFooterAfter'} +{capture name="footer_main_bottom"}{hook h='displayFooterAfter'}{/capture} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayFooterBefore.md b/modules/concepts/hooks/list-of-hooks/displayFooterBefore.md index df46007fa3..f9be4c2767 100644 --- a/modules/concepts/hooks/list-of-hooks/displayFooterBefore.md +++ b/modules/concepts/hooks/list-of-hooks/displayFooterBefore.md @@ -3,15 +3,14 @@ Title: displayFooterBefore hidden: true hookTitle: displayFooterBefore files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/_partials/footer.tpl - file: themes/classic/templates/_partials/footer.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/_partials/footer.tpl file: themes/hummingbird/templates/_partials/footer.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/_partials/footer.tpl + file: themes/classic/templates/_partials/footer.tpl locations: - front office type: display @@ -29,7 +28,7 @@ description: ## Call of the Hook in the origin file ```php -{hook h='displayFooterBefore'} +{capture name="footer_before"}{hook h='displayFooterBefore'}{/capture} ``` ## Example implementation diff --git a/modules/concepts/hooks/list-of-hooks/displayFooterCategory.md b/modules/concepts/hooks/list-of-hooks/displayFooterCategory.md index 03b493dbcd..b702e43ff1 100644 --- a/modules/concepts/hooks/list-of-hooks/displayFooterCategory.md +++ b/modules/concepts/hooks/list-of-hooks/displayFooterCategory.md @@ -4,9 +4,13 @@ hidden: true hookTitle: 'This hook adds new blocks under the products listing in a category/search' files: - - theme: Classic - url: 'https://github.com/PrestaShop/classic-theme/blob/2.0.x/templates/catalog/listing/product-list.tpl' - file: 'Classic Theme: templates/catalog/listing/product-list.tpl' + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/catalog/listing/product-list.tpl + file: themes/hummingbird/templates/catalog/listing/product-list.tpl + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/catalog/listing/product-list.tpl + file: themes/classic/templates/catalog/listing/product-list.tpl locations: - 'front office' type: display @@ -23,5 +27,5 @@ description: 'This hook adds new blocks under the products listing in a category ## Call of the Hook in the origin file ```php -{hook h="displayFooterCategory"} +{hook h='displayFooterCategory'} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayFooterProduct.md b/modules/concepts/hooks/list-of-hooks/displayFooterProduct.md index 066906e625..3a889d25f3 100644 --- a/modules/concepts/hooks/list-of-hooks/displayFooterProduct.md +++ b/modules/concepts/hooks/list-of-hooks/displayFooterProduct.md @@ -1,17 +1,16 @@ --- Title: displayFooterProduct hidden: true -hookTitle: Product footer +hookTitle: 'Product footer' files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/catalog/product.tpl - file: themes/classic/templates/catalog/product.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/catalog/product.tpl file: themes/hummingbird/templates/catalog/product.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/catalog/product.tpl + file: themes/classic/templates/catalog/product.tpl locations: - front office type: display diff --git a/modules/concepts/hooks/list-of-hooks/displayHeader.md b/modules/concepts/hooks/list-of-hooks/displayHeader.md index 17a30a973c..3bc9e88bb1 100644 --- a/modules/concepts/hooks/list-of-hooks/displayHeader.md +++ b/modules/concepts/hooks/list-of-hooks/displayHeader.md @@ -4,7 +4,10 @@ hidden: true hookTitle: 'Pages html head section' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/FrontController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Hook.php' + file: classes/Hook.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/FrontController.php' file: classes/controller/FrontController.php locations: - 'front office' @@ -24,5 +27,10 @@ description: 'This hook adds additional elements in the head section of your pag ## Call of the Hook in the origin file ```php -Hook::exec('displayHeader') +return 'displayHeader'; + } + + $hookNamesByAlias = Hook::getCanonicalHookNames(); + + return $hookNamesByAlias[$loweredName] ?? $hookName; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayHeaderCategory.md b/modules/concepts/hooks/list-of-hooks/displayHeaderCategory.md index b93c1bcfe6..e7edfd0816 100644 --- a/modules/concepts/hooks/list-of-hooks/displayHeaderCategory.md +++ b/modules/concepts/hooks/list-of-hooks/displayHeaderCategory.md @@ -4,9 +4,13 @@ hidden: true hookTitle: 'Footer above of the product list' files: - - theme: Classic - url: 'https://github.com/PrestaShop/classic-theme/blob/2.0.x/templates/catalog/listing/product-list.tpl' - file: 'Classic Theme: templates/catalog/listing/product-list.tpl' + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/catalog/listing/product-list.tpl + file: themes/hummingbird/templates/catalog/listing/product-list.tpl + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/catalog/listing/product-list.tpl + file: themes/classic/templates/catalog/listing/product-list.tpl locations: - 'front office' type: display @@ -23,5 +27,5 @@ description: 'This hook adds new blocks above the products listing in a category ## Call of the Hook in the origin file ```php -{hook h="displayHeaderCategory"} +{hook h='displayHeaderCategory'} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayHome.md b/modules/concepts/hooks/list-of-hooks/displayHome.md index 091fbb2546..35f77e982e 100644 --- a/modules/concepts/hooks/list-of-hooks/displayHome.md +++ b/modules/concepts/hooks/list-of-hooks/displayHome.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Homepage content' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/front/IndexController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/IndexController.php' file: controllers/front/IndexController.php locations: - 'front office' @@ -24,5 +24,5 @@ description: 'This hook displays new elements on the homepage' ## Call of the Hook in the origin file ```php -Hook::exec('displayHome') +'HOOK_HOME' => Hook::exec('displayHome'), ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayInvoiceLegalFreeText.md b/modules/concepts/hooks/list-of-hooks/displayInvoiceLegalFreeText.md index 49c7e92128..a3ba27dfb7 100644 --- a/modules/concepts/hooks/list-of-hooks/displayInvoiceLegalFreeText.md +++ b/modules/concepts/hooks/list-of-hooks/displayInvoiceLegalFreeText.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'PDF Invoice - Legal Free Text' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/pdf/HTMLTemplateInvoice.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/pdf/HTMLTemplateInvoice.php' file: classes/pdf/HTMLTemplateInvoice.php locations: - 'front office' @@ -23,5 +23,5 @@ description: 'This hook allows you to modify the legal free text on PDF invoices ## Call of the Hook in the origin file ```php -Hook::exec('displayInvoiceLegalFreeText', ['order' => $this->order]) +$legal_free_text = Hook::exec('displayInvoiceLegalFreeText', ['order' => $this->order]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayLeftColumn.md b/modules/concepts/hooks/list-of-hooks/displayLeftColumn.md index 917ee6ccca..4d5bf085f0 100644 --- a/modules/concepts/hooks/list-of-hooks/displayLeftColumn.md +++ b/modules/concepts/hooks/list-of-hooks/displayLeftColumn.md @@ -4,14 +4,22 @@ hidden: true hookTitle: 'New elements on a page (left column)' files: - - theme: Classic - url: 'https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-both-columns.tpl' - file: 'Classic Theme: templates/layouts/layout-both-columns.tpl' + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/layouts/layout-both-columns.tpl + file: themes/hummingbird/templates/layouts/layout-both-columns.tpl + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-both-columns.tpl + file: themes/classic/templates/layouts/layout-both-columns.tpl + - + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/layouts/layout-left-column.tpl + file: themes/hummingbird/templates/layouts/layout-left-column.tpl locations: - 'front office' type: display hookAliases: - - extraLeft + - leftColumn origin: theme array_return: false check_exceptions: false diff --git a/modules/concepts/hooks/list-of-hooks/displayLeftColumnProduct.md b/modules/concepts/hooks/list-of-hooks/displayLeftColumnProduct.md index 0e07f8fc61..7015e36c70 100644 --- a/modules/concepts/hooks/list-of-hooks/displayLeftColumnProduct.md +++ b/modules/concepts/hooks/list-of-hooks/displayLeftColumnProduct.md @@ -1,21 +1,20 @@ --- Title: displayLeftColumnProduct hidden: true -hookTitle: New elements on the product page (left column) +hookTitle: 'New elements on the product page (left column)' files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-both-columns.tpl - file: themes/classic/templates/layouts/layout-both-columns.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/layouts/layout-both-columns.tpl file: themes/hummingbird/templates/layouts/layout-both-columns.tpl + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-both-columns.tpl + file: themes/classic/templates/layouts/layout-both-columns.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/layouts/layout-left-column.tpl file: themes/hummingbird/templates/layouts/layout-left-column.tpl - locations: - front office type: display @@ -34,5 +33,5 @@ description: This hook displays new elements in the left-hand column of the prod ## Call of the Hook in the origin file ```php -{hook h='displayLeftColumnProduct' product=$product category=$category} +{hook h='displayLeftColumnProduct'} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayMaintenance.md b/modules/concepts/hooks/list-of-hooks/displayMaintenance.md index bd349b3f98..53d9f4fcc9 100644 --- a/modules/concepts/hooks/list-of-hooks/displayMaintenance.md +++ b/modules/concepts/hooks/list-of-hooks/displayMaintenance.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Maintenance Page' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/FrontController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/FrontController.php' file: classes/controller/FrontController.php locations: - 'front office' @@ -23,5 +23,5 @@ description: 'This hook displays new elements on the maintenance page' ## Call of the Hook in the origin file ```php -Hook::exec('displayMaintenance', []) +'HOOK_MAINTENANCE' => Hook::exec('displayMaintenance'), 'maintenance_text' => Configuration::get('PS_MAINTENANCE_TEXT', (int) $this->context->language->id), 'stylesheets' => $this->getStylesheets(), ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayModalContent.md b/modules/concepts/hooks/list-of-hooks/displayModalContent.md index 3adcd4a283..ada3002047 100644 --- a/modules/concepts/hooks/list-of-hooks/displayModalContent.md +++ b/modules/concepts/hooks/list-of-hooks/displayModalContent.md @@ -4,8 +4,9 @@ hidden: true hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/themes/hummingbird/templates/layouts/layout-both-columns.tpl' - file: themes/hummingbird/templates/layouts/layout-both-columns.tpl + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/layouts/layout-both-columns.tpl + file: themes/hummingbird/templates/layouts/layout-both-columns.tpl locations: - 'front office' type: display @@ -13,7 +14,7 @@ hookAliases: array_return: false check_exceptions: false chain: false -origin: core +origin: theme description: '' --- @@ -23,5 +24,5 @@ description: '' ## Call of the Hook in the origin file ```php -{hook h='displayModalContent'}; +{hook h='displayModalContent'} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayNav1.md b/modules/concepts/hooks/list-of-hooks/displayNav1.md index 3d452d706b..c0c39834d8 100644 --- a/modules/concepts/hooks/list-of-hooks/displayNav1.md +++ b/modules/concepts/hooks/list-of-hooks/displayNav1.md @@ -3,6 +3,10 @@ Title: displayNav1 hidden: true hookTitle: displayNav1 files: + - + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/_partials/header.tpl + file: themes/hummingbird/templates/_partials/header.tpl - theme: classic url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/_partials/header.tpl @@ -11,11 +15,6 @@ files: theme: classic url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/checkout/_partials/header.tpl file: themes/classic/templates/checkout/_partials/header.tpl - - - theme: hummingbird - url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/_partials/header.tpl - file: themes/hummingbird/templates/_partials/header.tpl - locations: - front office type: display @@ -33,5 +32,5 @@ description: ## Call of the Hook in the origin file ```php -{hook h='displayNav1'} +{capture name="header_nav_1"}{hook h='displayNav1'}{/capture} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayNav2.md b/modules/concepts/hooks/list-of-hooks/displayNav2.md index 9d2b9c2319..fffd834e6f 100644 --- a/modules/concepts/hooks/list-of-hooks/displayNav2.md +++ b/modules/concepts/hooks/list-of-hooks/displayNav2.md @@ -3,6 +3,10 @@ Title: displayNav2 hidden: true hookTitle: displayNav2 files: + - + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/_partials/header.tpl + file: themes/hummingbird/templates/_partials/header.tpl - theme: classic url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/_partials/header.tpl @@ -11,11 +15,6 @@ files: theme: classic url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/checkout/_partials/header.tpl file: themes/classic/templates/checkout/_partials/header.tpl - - - theme: hummingbird - url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/_partials/header.tpl - file: themes/hummingbird/templates/_partials/header.tpl - locations: - front office type: display @@ -33,5 +32,5 @@ description: ## Call of the Hook in the origin file ```php -{hook h='displayNav2'} +{capture name="header_nav_2"}{hook h='displayNav2'}{/capture} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayNavFullWidth.md b/modules/concepts/hooks/list-of-hooks/displayNavFullWidth.md index a80087edb7..1d7f9fbdff 100644 --- a/modules/concepts/hooks/list-of-hooks/displayNavFullWidth.md +++ b/modules/concepts/hooks/list-of-hooks/displayNavFullWidth.md @@ -1,8 +1,12 @@ --- Title: displayNavFullWidth hidden: true -hookTitle: Navigation +hookTitle: 'Navigation' files: + - + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/_partials/header.tpl + file: themes/hummingbird/templates/_partials/header.tpl - theme: classic url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/_partials/header.tpl @@ -11,11 +15,6 @@ files: theme: classic url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/checkout/_partials/header.tpl file: themes/classic/templates/checkout/_partials/header.tpl - - - theme: hummingbird - url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/_partials/header.tpl - file: themes/hummingbird/templates/_partials/header.tpl - locations: - front office type: display @@ -33,5 +32,5 @@ description: This hook displays full width navigation menu at the top of your pa ## Call of the Hook in the origin file ```php -{hook h='displayNavFullWidth'} +{capture name="nav_full_width"}{hook h='displayNavFullWidth'}{/capture} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayNotFound.md b/modules/concepts/hooks/list-of-hooks/displayNotFound.md index d559f77c0c..c9368c5788 100644 --- a/modules/concepts/hooks/list-of-hooks/displayNotFound.md +++ b/modules/concepts/hooks/list-of-hooks/displayNotFound.md @@ -3,15 +3,14 @@ Title: displayNotFound hidden: true hookTitle: displayNotFound files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/errors/not-found.tpl - file: themes/classic/templates/errors/not-found.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/errors/not-found.tpl file: themes/hummingbird/templates/errors/not-found.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/errors/not-found.tpl + file: themes/classic/templates/errors/not-found.tpl locations: - front office type: display diff --git a/modules/concepts/hooks/list-of-hooks/displayOrderConfirmation.md b/modules/concepts/hooks/list-of-hooks/displayOrderConfirmation.md index 8751e522f8..902a280df1 100644 --- a/modules/concepts/hooks/list-of-hooks/displayOrderConfirmation.md +++ b/modules/concepts/hooks/list-of-hooks/displayOrderConfirmation.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Order confirmation page' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/front/OrderConfirmationController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/OrderConfirmationController.php' file: controllers/front/OrderConfirmationController.php locations: - 'front office' @@ -15,7 +15,7 @@ array_return: false check_exceptions: false chain: false origin: core -description: "This hook is called within an order's confirmation page" +description: 'This hook is called within an order''s confirmation page' --- @@ -33,5 +33,5 @@ description: "This hook is called within an order's confirmation page" ## Call of the Hook in the origin file ```php -Hook::exec('displayOrderConfirmation', ['order' => $order]) +return Hook::exec('displayOrderConfirmation', ['order' => $order]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayOrderConfirmation1.md b/modules/concepts/hooks/list-of-hooks/displayOrderConfirmation1.md index 72681e04cc..0eb8ad4743 100644 --- a/modules/concepts/hooks/list-of-hooks/displayOrderConfirmation1.md +++ b/modules/concepts/hooks/list-of-hooks/displayOrderConfirmation1.md @@ -3,15 +3,14 @@ Title: displayOrderConfirmation1 hidden: true hookTitle: displayOrderConfirmation1 files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/checkout/order-confirmation.tpl - file: themes/classic/templates/checkout/order-confirmation.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/checkout/order-confirmation.tpl file: themes/hummingbird/templates/checkout/order-confirmation.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/checkout/order-confirmation.tpl + file: themes/classic/templates/checkout/order-confirmation.tpl locations: - front office type: display @@ -29,5 +28,5 @@ description: ## Call of the Hook in the origin file ```php -{hook h='displayOrderConfirmation1'} +{capture name='hook_order_confirmation_1'}{hook h='displayOrderConfirmation1'}{/capture} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayOrderConfirmation2.md b/modules/concepts/hooks/list-of-hooks/displayOrderConfirmation2.md index 9fb93598e3..611f9cb15a 100644 --- a/modules/concepts/hooks/list-of-hooks/displayOrderConfirmation2.md +++ b/modules/concepts/hooks/list-of-hooks/displayOrderConfirmation2.md @@ -3,15 +3,14 @@ Title: displayOrderConfirmation2 hidden: true hookTitle: displayOrderConfirmation2 files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/checkout/order-confirmation.tpl - file: themes/classic/templates/checkout/order-confirmation.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/checkout/order-confirmation.tpl file: themes/hummingbird/templates/checkout/order-confirmation.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/checkout/order-confirmation.tpl + file: themes/classic/templates/checkout/order-confirmation.tpl locations: - front office type: display diff --git a/modules/concepts/hooks/list-of-hooks/displayOrderDetail.md b/modules/concepts/hooks/list-of-hooks/displayOrderDetail.md index eff4a8b1a6..8b84464aa6 100644 --- a/modules/concepts/hooks/list-of-hooks/displayOrderDetail.md +++ b/modules/concepts/hooks/list-of-hooks/displayOrderDetail.md @@ -4,8 +4,15 @@ hidden: true hookTitle: 'Order detail' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/front/OrderDetailController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/GuestTrackingController.php' + file: controllers/front/GuestTrackingController.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/OrderDetailController.php' file: controllers/front/OrderDetailController.php + - + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/customer/order-detail.tpl + file: themes/hummingbird/templates/customer/order-detail.tpl locations: - 'front office' type: display @@ -33,5 +40,5 @@ description: "This hook is displayed within the order's details in Front Office" ## Call of the Hook in the origin file ```php -Hook::exec('displayOrderDetail', ['order' => $order]) +'HOOK_DISPLAYORDERDETAIL' => Hook::exec('displayOrderDetail', ['order' => $this->order]), ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayOrderPreview.md b/modules/concepts/hooks/list-of-hooks/displayOrderPreview.md index fbb4065ec4..5fdf8a2f1a 100644 --- a/modules/concepts/hooks/list-of-hooks/displayOrderPreview.md +++ b/modules/concepts/hooks/list-of-hooks/displayOrderPreview.md @@ -1,10 +1,10 @@ --- Title: displayOrderPreview hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/preview.html.twig' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/preview.html.twig' file: src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/preview.html.twig locations: - 'back office' @@ -32,5 +32,6 @@ description: '' ## Call of the Hook in the origin file ```php -{{ renderhook('displayOrderPreview', {'order_id': orderId}) }} +{{ renderhook('displayOrderPreview', {order_id: orderId}) }} +{% endblock %} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayOverrideTemplate.md b/modules/concepts/hooks/list-of-hooks/displayOverrideTemplate.md index e825f34f99..eab1a57a3e 100644 --- a/modules/concepts/hooks/list-of-hooks/displayOverrideTemplate.md +++ b/modules/concepts/hooks/list-of-hooks/displayOverrideTemplate.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Change the default template of current controller' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/FrontController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/FrontController.php' file: classes/controller/FrontController.php locations: - 'front office' @@ -42,13 +42,13 @@ Hook::exec( ```php Hook::exec( - 'displayOverrideTemplate', - [ - 'controller' => $this, - 'template_file' => $template, - 'entity' => $params['entity'], - 'id' => $params['id'], - 'locale' => $locale, - ] -) + 'displayOverrideTemplate', + [ + 'controller' => $this, + 'template_file' => $template, + 'entity' => $params['entity'], + 'id' => $params['id'], + 'locale' => $locale, + ] + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayPaymentByBinaries.md b/modules/concepts/hooks/list-of-hooks/displayPaymentByBinaries.md index fe89c0d549..1f0946760c 100644 --- a/modules/concepts/hooks/list-of-hooks/displayPaymentByBinaries.md +++ b/modules/concepts/hooks/list-of-hooks/displayPaymentByBinaries.md @@ -1,7 +1,7 @@ --- Title: displayPaymentByBinaries hidden: true -hookTitle: Payment form generated by binaries +hookTitle: 'Payment form generated by binaries' files: - theme: classic @@ -11,7 +11,6 @@ files: theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/checkout/_partials/steps/payment.tpl file: themes/hummingbird/templates/checkout/_partials/steps/payment.tpl - locations: - front office type: display diff --git a/modules/concepts/hooks/list-of-hooks/displayPaymentReturn.md b/modules/concepts/hooks/list-of-hooks/displayPaymentReturn.md index 28722cb429..d0dc7a8fde 100644 --- a/modules/concepts/hooks/list-of-hooks/displayPaymentReturn.md +++ b/modules/concepts/hooks/list-of-hooks/displayPaymentReturn.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Payment return' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/front/OrderConfirmationController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/OrderConfirmationController.php' file: controllers/front/OrderConfirmationController.php locations: - 'front office' @@ -24,5 +24,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('displayPaymentReturn', ['order' => $order], $this->id_module) +return Hook::exec('displayPaymentReturn', ['order' => $order], $this->id_module) ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayPaymentTop.md b/modules/concepts/hooks/list-of-hooks/displayPaymentTop.md index 59ccc221a8..0932899871 100644 --- a/modules/concepts/hooks/list-of-hooks/displayPaymentTop.md +++ b/modules/concepts/hooks/list-of-hooks/displayPaymentTop.md @@ -1,7 +1,7 @@ --- Title: displayPaymentTop hidden: true -hookTitle: Top of payment page +hookTitle: 'Top of payment page' files: - theme: classic @@ -11,7 +11,6 @@ files: theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/checkout/_partials/steps/payment.tpl file: themes/hummingbird/templates/checkout/_partials/steps/payment.tpl - locations: - front office type: display diff --git a/modules/concepts/hooks/list-of-hooks/displayPersonalInformationTop.md b/modules/concepts/hooks/list-of-hooks/displayPersonalInformationTop.md index c671339765..6e7295bb4d 100644 --- a/modules/concepts/hooks/list-of-hooks/displayPersonalInformationTop.md +++ b/modules/concepts/hooks/list-of-hooks/displayPersonalInformationTop.md @@ -1,7 +1,7 @@ --- Title: displayPersonalInformationTop hidden: true -hookTitle: Content in the checkout funnel, on top of the personal information panel +hookTitle: 'Content in the checkout funnel, on top of the personal information panel' files: - theme: classic @@ -11,7 +11,6 @@ files: theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/checkout/_partials/steps/personal-information.tpl file: themes/hummingbird/templates/checkout/_partials/steps/personal-information.tpl - locations: - front office type: display diff --git a/modules/concepts/hooks/list-of-hooks/displayProductActions.md b/modules/concepts/hooks/list-of-hooks/displayProductActions.md index e97b254f9d..8cf0f159f5 100644 --- a/modules/concepts/hooks/list-of-hooks/displayProductActions.md +++ b/modules/concepts/hooks/list-of-hooks/displayProductActions.md @@ -1,7 +1,7 @@ --- Title: displayProductActions hidden: true -hookTitle: Display additional action button on the product page +hookTitle: 'Display additional action button on the product page' files: - theme: classic @@ -11,10 +11,9 @@ files: theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/catalog/_partials/product-add-to-cart.tpl file: themes/hummingbird/templates/catalog/_partials/product-add-to-cart.tpl - locations: - front office -type: action +type: display hookAliases: origin: theme array_return: false diff --git a/modules/concepts/hooks/list-of-hooks/displayProductAdditionalInfo.md b/modules/concepts/hooks/list-of-hooks/displayProductAdditionalInfo.md index 7e2c21649a..d2809faeb6 100644 --- a/modules/concepts/hooks/list-of-hooks/displayProductAdditionalInfo.md +++ b/modules/concepts/hooks/list-of-hooks/displayProductAdditionalInfo.md @@ -1,8 +1,12 @@ --- Title: displayProductAdditionalInfo hidden: true -hookTitle: Product page additional info +hookTitle: 'Product page additional info' files: + - + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/catalog/_partials/product-additional-info.tpl + file: themes/hummingbird/templates/catalog/_partials/product-additional-info.tpl - theme: classic url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/catalog/_partials/product-additional-info.tpl @@ -11,15 +15,6 @@ files: theme: classic url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/catalog/_partials/quickview.tpl file: themes/classic/templates/catalog/_partials/quickview.tpl - - - theme: hummingbird - url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/catalog/_partials/product-additional-info.tpl - file: themes/hummingbird/templates/catalog/_partials/product-additional-info.tpl - - - theme: hummingbird - url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/catalog/_partials/quickview.tpl - file: themes/hummingbird/templates/catalog/_partials/quickview.tpl - locations: - front office type: display diff --git a/modules/concepts/hooks/list-of-hooks/displayProductExtraContent.md b/modules/concepts/hooks/list-of-hooks/displayProductExtraContent.md index a8771af992..3afcb9bd69 100644 --- a/modules/concepts/hooks/list-of-hooks/displayProductExtraContent.md +++ b/modules/concepts/hooks/list-of-hooks/displayProductExtraContent.md @@ -3,20 +3,16 @@ Title: displayProductExtraContent hidden: true hookTitle: 'Add content to the product page' files: - - - theme: classic - url: 'https://github.com/PrestaShop/classic-theme/blob/develop/templates/catalog/product.tpl#L216' - file: 'templates/catalog/product.tml' - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Core/Product/ProductExtraContent.php' - file: 'src/Core/Product/ProductExtraContent.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Core/Product/ProductExtraContent.php' + file: src/Core/Product/ProductExtraContent.php - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Core/Product/ProductExtraContentFinder.php' - file: 'src/Core/Product/ProductExtraContentFinder.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Core/Product/ProductExtraContentFinder.php' + file: src/Core/Product/ProductExtraContentFinder.php locations: - 'front office' type: display -hookAliases: +hookAliases: origin: core array_return: false check_exceptions: false @@ -30,8 +26,11 @@ has_example: true ## Call of the Hook in the origin file ```php -protected $hookName = 'displayProductExtraContent'; -protected $expectedInstanceClasses = ['PrestaShop\PrestaShop\Core\Product\ProductExtraContent']; + $categoryVar], $id_module = null, $array_return = false, $check_exceptions = true, $use_push = false, - $id_shop = null, - $chain = true - ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/filterCmsCategoryContent.md b/modules/concepts/hooks/list-of-hooks/filterCmsCategoryContent.md index 8f840506aa..933e1bae1f 100644 --- a/modules/concepts/hooks/list-of-hooks/filterCmsCategoryContent.md +++ b/modules/concepts/hooks/list-of-hooks/filterCmsCategoryContent.md @@ -4,14 +4,14 @@ hidden: true hookTitle: 'Filter the content page category' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/front/CmsController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/CmsController.php' file: controllers/front/CmsController.php locations: - 'front office' -type: null +type: action hookAliases: array_return: false -check_exceptions: false +check_exceptions: true chain: true origin: core description: 'This hook is called just before fetching content page category' @@ -23,14 +23,10 @@ description: 'This hook is called just before fetching content page category' ## Call of the Hook in the origin file ```php -Hook::exec( - 'filterCmsCategoryContent', +'filterCmsCategoryContent', ['object' => $cmsCategoryVar], - $id_module = null, - $array_return = false, - $check_exceptions = true, - $use_push = false, - $id_shop = null, - $chain = true - ) + null, + false, + true, + false, ``` diff --git a/modules/concepts/hooks/list-of-hooks/filterCmsContent.md b/modules/concepts/hooks/list-of-hooks/filterCmsContent.md index b953ba3bab..db8265470a 100644 --- a/modules/concepts/hooks/list-of-hooks/filterCmsContent.md +++ b/modules/concepts/hooks/list-of-hooks/filterCmsContent.md @@ -4,14 +4,14 @@ hidden: true hookTitle: 'Filter the content page' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/front/CmsController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/CmsController.php' file: controllers/front/CmsController.php locations: - 'front office' -type: null +type: action hookAliases: array_return: false -check_exceptions: false +check_exceptions: true chain: true origin: core description: 'This hook is called just before fetching content page' @@ -23,14 +23,10 @@ description: 'This hook is called just before fetching content page' ## Call of the Hook in the origin file ```php -Hook::exec( - 'filterCmsContent', +'filterCmsContent', ['object' => $cmsVar], - $id_module = null, - $array_return = false, - $check_exceptions = true, - $use_push = false, - $id_shop = null, - $chain = true - ) + null, + false, + true, + false, ``` diff --git a/modules/concepts/hooks/list-of-hooks/filterHtmlContent.md b/modules/concepts/hooks/list-of-hooks/filterHtmlContent.md index bde4419f40..0e99e76b28 100644 --- a/modules/concepts/hooks/list-of-hooks/filterHtmlContent.md +++ b/modules/concepts/hooks/list-of-hooks/filterHtmlContent.md @@ -4,14 +4,14 @@ hidden: true hookTitle: 'Filter HTML field before rending a page' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Presenter/Object/ObjectPresenter.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Presenter/Object/ObjectPresenter.php' file: src/Adapter/Presenter/Object/ObjectPresenter.php locations: - 'front office' -type: null +type: action hookAliases: array_return: false -check_exceptions: false +check_exceptions: true chain: true origin: core description: 'This hook is called just before fetching a page on HTML field' @@ -23,18 +23,10 @@ description: 'This hook is called just before fetching a page on HTML field' ## Call of the Hook in the origin file ```php -Hook::exec( - 'filterHtmlContent', +'filterHtmlContent', [ 'type' => $type, 'htmlFields' => $htmlFields, 'object' => $presentedObject, ], - null, - false, - true, - false, - null, - true - ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/filterManufacturerContent.md b/modules/concepts/hooks/list-of-hooks/filterManufacturerContent.md index 7e97cfaf41..c7295dec22 100644 --- a/modules/concepts/hooks/list-of-hooks/filterManufacturerContent.md +++ b/modules/concepts/hooks/list-of-hooks/filterManufacturerContent.md @@ -4,15 +4,15 @@ hidden: true hookTitle: 'Filter the content page manufacturer' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/front/listing/ManufacturerController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/listing/ManufacturerController.php' file: controllers/front/listing/ManufacturerController.php locations: - 'front office' -type: null +type: action hookAliases: -array_return: false -check_exceptions: false -chain: true +array_return: $array_return = false +check_exceptions: $check_exceptions = true +chain: $chain = true origin: core description: 'This hook is called just before fetching content page manufacturer' @@ -23,14 +23,10 @@ description: 'This hook is called just before fetching content page manufacturer ## Call of the Hook in the origin file ```php -Hook::exec( - 'filterManufacturerContent', - ['filtered_content' => $manufacturerVar['description']], +'filterManufacturerContent', + ['object' => $manufacturerVar], $id_module = null, $array_return = false, $check_exceptions = true, $use_push = false, - $id_shop = null, - $chain = true - ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/filterProductContent.md b/modules/concepts/hooks/list-of-hooks/filterProductContent.md index 2c3899bb14..d0e7b96f51 100644 --- a/modules/concepts/hooks/list-of-hooks/filterProductContent.md +++ b/modules/concepts/hooks/list-of-hooks/filterProductContent.md @@ -4,14 +4,14 @@ hidden: true hookTitle: 'Filter the content page product' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/front/ProductController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/ProductController.php' file: controllers/front/ProductController.php locations: - 'front office' -type: null +type: action hookAliases: array_return: false -check_exceptions: false +check_exceptions: true chain: true origin: core description: 'This hook is called just before fetching content page product' @@ -23,14 +23,10 @@ description: 'This hook is called just before fetching content page product' ## Call of the Hook in the origin file ```php -Hook::exec( - 'filterProductContent', - ['object' => $product_for_template], - null, - false, - true, - false, - null, - true - ) +'filterProductContent', + ['object' => $product_for_template], + null, + false, + true, + false, ``` diff --git a/modules/concepts/hooks/list-of-hooks/filterProductSearch.md b/modules/concepts/hooks/list-of-hooks/filterProductSearch.md index 154c3cdef7..feaa920931 100644 --- a/modules/concepts/hooks/list-of-hooks/filterProductSearch.md +++ b/modules/concepts/hooks/list-of-hooks/filterProductSearch.md @@ -4,11 +4,11 @@ hidden: true hookTitle: 'Filter search products result' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/modules/blockwishlist/controllers/front/view.php' - file: modules/blockwishlist/controllers/front/view.php + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/ProductListingFrontController.php' + file: classes/controller/ProductListingFrontController.php locations: - 'front office' -type: null +type: action hookAliases: array_return: false check_exceptions: false diff --git a/modules/concepts/hooks/list-of-hooks/filterSupplierContent.md b/modules/concepts/hooks/list-of-hooks/filterSupplierContent.md index 24a4be8656..5a0adb6356 100644 --- a/modules/concepts/hooks/list-of-hooks/filterSupplierContent.md +++ b/modules/concepts/hooks/list-of-hooks/filterSupplierContent.md @@ -4,14 +4,14 @@ hidden: true hookTitle: 'Filter the content page supplier' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/front/listing/SupplierController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/listing/SupplierController.php' file: controllers/front/listing/SupplierController.php locations: - 'front office' -type: null +type: action hookAliases: array_return: false -check_exceptions: false +check_exceptions: true chain: true origin: core description: 'This hook is called just before fetching content page supplier' @@ -23,14 +23,10 @@ description: 'This hook is called just before fetching content page supplier' ## Call of the Hook in the origin file ```php -Hook::exec( - 'filterSupplierContent', +'filterSupplierContent', ['object' => $supplierVar], - $id_module = null, - $array_return = false, - $check_exceptions = true, - $use_push = false, - $id_shop = null, - $chain = true - ) + null, + false, + true, + false, ``` diff --git a/modules/concepts/hooks/list-of-hooks/gSitemapAppendUrls.md b/modules/concepts/hooks/list-of-hooks/gSitemapAppendUrls.md index fe8b30aa24..e090a1b2b6 100644 --- a/modules/concepts/hooks/list-of-hooks/gSitemapAppendUrls.md +++ b/modules/concepts/hooks/list-of-hooks/gSitemapAppendUrls.md @@ -4,8 +4,9 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/modules/gsitemap/gsitemap.php' - file: modules/gsitemap/gsitemap.php + module: gsitemap + url: 'https://github.com/PrestaShop/gsitemap/blob/dev/gsitemap.php' + file: gsitemap.php locations: - 'front office' type: null @@ -13,7 +14,7 @@ hookAliases: array_return: true check_exceptions: false chain: false -origin: core +origin: module description: '' --- diff --git a/modules/concepts/hooks/list-of-hooks/legacyblockkpi.md b/modules/concepts/hooks/list-of-hooks/legacyblockkpi.md index a0a22b4615..f5069d2d29 100644 --- a/modules/concepts/hooks/list-of-hooks/legacyblockkpi.md +++ b/modules/concepts/hooks/list-of-hooks/legacyblockkpi.md @@ -4,8 +4,8 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Resources/views/Admin/Product/CatalogPage/catalog.html.twig' - file: src/PrestaShopBundle/Resources/views/Admin/Product/CatalogPage/catalog.html.twig + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Admin/LegacyBlockHelperSubscriber.php' + file: src/Adapter/Admin/LegacyBlockHelperSubscriber.php locations: - 'back office' type: null diff --git a/modules/concepts/hooks/list-of-hooks/moduleRoutes.md b/modules/concepts/hooks/list-of-hooks/moduleRoutes.md index b9f46f2705..57a81e8062 100644 --- a/modules/concepts/hooks/list-of-hooks/moduleRoutes.md +++ b/modules/concepts/hooks/list-of-hooks/moduleRoutes.md @@ -1,14 +1,14 @@ --- Title: moduleRoutes hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Dispatcher.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Dispatcher.php' file: classes/Dispatcher.php locations: - 'front office' -type: null +type: action hookAliases: hasExample: true array_return: true @@ -24,7 +24,7 @@ description: 'This hook allows your module to extend default PrestaShop routes w ## Call of the Hook in the origin file ```php -Hook::exec('moduleRoutes', ['id_shop' => $id_shop], null, true, false) +$modules_routes = Hook::exec('moduleRoutes', ['id_shop' => $id_shop], null, true, false) ``` ## Example implementation @@ -177,5 +177,4 @@ class MyModuleAddingRoutes extends Module } ``` -The complete implementation example is available in our [example modules repository](https://github.com/PrestaShop/example-modules/tree/master/demomoduleroutes). - +The complete implementation example is available in our [example modules repository](https://github.com/PrestaShop/example-modules/tree/master/demomoduleroutes). \ No newline at end of file diff --git a/modules/concepts/hooks/list-of-hooks/overrideLayoutTemplate.md b/modules/concepts/hooks/list-of-hooks/overrideLayoutTemplate.md index 3ae912cbae..d16bf07b7d 100644 --- a/modules/concepts/hooks/list-of-hooks/overrideLayoutTemplate.md +++ b/modules/concepts/hooks/list-of-hooks/overrideLayoutTemplate.md @@ -1,14 +1,14 @@ --- Title: overrideLayoutTemplate hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/FrontController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/FrontController.php' file: classes/controller/FrontController.php locations: - 'front office' -type: null +type: action hookAliases: array_return: false check_exceptions: false @@ -23,14 +23,10 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec( - 'overrideLayoutTemplate', +'overrideLayoutTemplate', [ 'default_layout' => $layout, 'entity' => $entity, 'locale' => $this->context->language->locale, 'controller' => $this, - 'content_only' => $content_only, - ] - ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/overrideMinimalPurchasePrice.md b/modules/concepts/hooks/list-of-hooks/overrideMinimalPurchasePrice.md index 928319b726..eeff9ce5e2 100644 --- a/modules/concepts/hooks/list-of-hooks/overrideMinimalPurchasePrice.md +++ b/modules/concepts/hooks/list-of-hooks/overrideMinimalPurchasePrice.md @@ -1,14 +1,17 @@ --- Title: overrideMinimalPurchasePrice hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Presenter/Cart/CartPresenter.php' - file: src/Adapter/Presenter/Cart/CartPresenter.php + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/ModuleFrontController.php' + file: classes/controller/ModuleFrontController.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Presenter/Cart/CartLazyArray.php' + file: src/Adapter/Presenter/Cart/CartLazyArray.php locations: - 'front office' -type: null +type: action hookAliases: array_return: false check_exceptions: false @@ -23,7 +26,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('overrideMinimalPurchasePrice', [ - 'minimalPurchase' => &$minimalPurchase, - ]) +Hook::exec('overrideMinimalPurchasePrice', [ 'minimalPurchase' => &$minimalPurchase, ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/productSearchProvider.md b/modules/concepts/hooks/list-of-hooks/productSearchProvider.md index 3a56e86acb..70811f282a 100644 --- a/modules/concepts/hooks/list-of-hooks/productSearchProvider.md +++ b/modules/concepts/hooks/list-of-hooks/productSearchProvider.md @@ -1,14 +1,14 @@ --- Title: productSearchProvider hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/ProductListingFrontController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/ProductListingFrontController.php' file: classes/controller/ProductListingFrontController.php locations: - 'front office' -type: null +type: action hookAliases: array_return: true check_exceptions: false @@ -23,10 +23,9 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec( - 'productSearchProvider', +'productSearchProvider', ['query' => $query], null, true - ) + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/sendMailAlterTemplateVars.md b/modules/concepts/hooks/list-of-hooks/sendMailAlterTemplateVars.md index 9816d135b1..de1824e810 100644 --- a/modules/concepts/hooks/list-of-hooks/sendMailAlterTemplateVars.md +++ b/modules/concepts/hooks/list-of-hooks/sendMailAlterTemplateVars.md @@ -4,11 +4,11 @@ hidden: true hookTitle: 'Alter template vars on the fly' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Mail.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Mail.php' file: classes/Mail.php locations: - 'front office' -type: null +type: action hookAliases: array_return: false check_exceptions: false @@ -23,11 +23,10 @@ description: 'This hook is called when Mail::send() is called' ## Call of the Hook in the origin file ```php -Hook::exec( - 'sendMailAlterTemplateVars', +'sendMailAlterTemplateVars', [ 'template' => $template, 'template_vars' => &$templateVars, ] - ) + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/termsAndConditions.md b/modules/concepts/hooks/list-of-hooks/termsAndConditions.md index c4c95829e5..4d64907bd9 100644 --- a/modules/concepts/hooks/list-of-hooks/termsAndConditions.md +++ b/modules/concepts/hooks/list-of-hooks/termsAndConditions.md @@ -1,14 +1,14 @@ --- Title: termsAndConditions hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/checkout/ConditionsToApproveFinder.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/checkout/ConditionsToApproveFinder.php' file: classes/checkout/ConditionsToApproveFinder.php locations: - 'front office' -type: null +type: action hookAliases: array_return: true check_exceptions: false @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('termsAndConditions', [], null, true) +$hookedConditions = Hook::exec('termsAndConditions', [], null, true) ``` diff --git a/modules/concepts/hooks/list-of-hooks/validateCustomerFormFields.md b/modules/concepts/hooks/list-of-hooks/validateCustomerFormFields.md index abf5091338..55d73b51f3 100644 --- a/modules/concepts/hooks/list-of-hooks/validateCustomerFormFields.md +++ b/modules/concepts/hooks/list-of-hooks/validateCustomerFormFields.md @@ -4,11 +4,11 @@ hidden: true hookTitle: 'Customer registration form validation' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/form/CustomerForm.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/form/CustomerForm.php' file: classes/form/CustomerForm.php locations: - 'front office' -type: null +type: action hookAliases: array_return: true check_exceptions: false @@ -23,5 +23,5 @@ description: 'This hook is called to a module when it has sent additional fields ## Call of the Hook in the origin file ```php -Hook::exec('validateCustomerFormFields', ['fields' => $formFields], $moduleId, true) +$validatedCustomerFormFields = Hook::exec('validateCustomerFormFields', ['fields' => $formFields], $moduleId, true) ```