> For the complete documentation index, see [llms.txt](https://docs.prestashop-project.org/1-5-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.prestashop-project.org/1-5-documentation/documentation-francaise/guide-de-lintegrateur/integrer-du-contenu-dans-une-page-a-laide-de-hooks.md).

# Intégrer du contenu dans une page à l'aide de hooks

**Contenu**

* [Intégrer du contenu dans une page à l'aide de hooks](https://docs.prestashop-project.org/1-5-documentation/documentation-francaise/guide-de-lintegrateur/pages/-MEbUSgM_k1NeMYaaSVO#Intégrerducontenudansunepageàl%27aidedehooks-Intégrerducontenudansunepageàl%27aidedehooks)
  * [Hooks existants : front-office](https://docs.prestashop-project.org/1-5-documentation/documentation-francaise/guide-de-lintegrateur/pages/-MEbUSgM_k1NeMYaaSVO#Intégrerducontenudansunepageàl%27aidedehooks-Hooksexistants:front-office)
    * [Page d'accueil et pages générales du site](https://docs.prestashop-project.org/1-5-documentation/documentation-francaise/guide-de-lintegrateur/pages/-MEbUSgM_k1NeMYaaSVO#Intégrerducontenudansunepageàl%27aidedehooks-Paged%27accueiletpagesgénéralesdusite)
    * [Page produit](https://docs.prestashop-project.org/1-5-documentation/documentation-francaise/guide-de-lintegrateur/pages/-MEbUSgM_k1NeMYaaSVO#Intégrerducontenudansunepageàl%27aidedehooks-Pageproduit)
    * [Page du panier](https://docs.prestashop-project.org/1-5-documentation/documentation-francaise/guide-de-lintegrateur/pages/-MEbUSgM_k1NeMYaaSVO#Intégrerducontenudansunepageàl%27aidedehooks-Pagedupanier)
    * [Page de recherche](https://docs.prestashop-project.org/1-5-documentation/documentation-francaise/guide-de-lintegrateur/pages/-MEbUSgM_k1NeMYaaSVO#Intégrerducontenudansunepageàl%27aidedehooks-Pagederecherche)
    * [Page de choix du transport](https://docs.prestashop-project.org/1-5-documentation/documentation-francaise/guide-de-lintegrateur/pages/-MEbUSgM_k1NeMYaaSVO#Intégrerducontenudansunepageàl%27aidedehooks-Pagedechoixdutransport)
    * [Page de paiement](https://docs.prestashop-project.org/1-5-documentation/documentation-francaise/guide-de-lintegrateur/pages/-MEbUSgM_k1NeMYaaSVO#Intégrerducontenudansunepageàl%27aidedehooks-Pagedepaiement)
    * [Page de commande](https://docs.prestashop-project.org/1-5-documentation/documentation-francaise/guide-de-lintegrateur/pages/-MEbUSgM_k1NeMYaaSVO#Intégrerducontenudansunepageàl%27aidedehooks-Pagedecommande)
  * [Hooks existants : back-office](https://docs.prestashop-project.org/1-5-documentation/documentation-francaise/guide-de-lintegrateur/pages/-MEbUSgM_k1NeMYaaSVO#Intégrerducontenudansunepageàl%27aidedehooks-Hooksexistants:back-office)
    * [Hooks généraux](https://docs.prestashop-project.org/1-5-documentation/documentation-francaise/guide-de-lintegrateur/pages/-MEbUSgM_k1NeMYaaSVO#Intégrerducontenudansunepageàl%27aidedehooks-Hooksgénéraux)
    * [Commandes et détails de la commande](https://docs.prestashop-project.org/1-5-documentation/documentation-francaise/guide-de-lintegrateur/pages/-MEbUSgM_k1NeMYaaSVO#Intégrerducontenudansunepageàl%27aidedehooks-Commandesetdétailsdelacommande)
    * [Produits](https://docs.prestashop-project.org/1-5-documentation/documentation-francaise/guide-de-lintegrateur/pages/-MEbUSgM_k1NeMYaaSVO#Intégrerducontenudansunepageàl%27aidedehooks-Produits)
    * [Statistiques](https://docs.prestashop-project.org/1-5-documentation/documentation-francaise/guide-de-lintegrateur/pages/-MEbUSgM_k1NeMYaaSVO#Intégrerducontenudansunepageàl%27aidedehooks-Statistiques)
    * [Clients](https://docs.prestashop-project.org/1-5-documentation/documentation-francaise/guide-de-lintegrateur/pages/-MEbUSgM_k1NeMYaaSVO#Intégrerducontenudansunepageàl%27aidedehooks-Clients)
    * [Transporteurs](https://docs.prestashop-project.org/1-5-documentation/documentation-francaise/guide-de-lintegrateur/pages/-MEbUSgM_k1NeMYaaSVO#Intégrerducontenudansunepageàl%27aidedehooks-Transporteurs)
  * [Visualiser l'emplacement des principaux hooks](https://docs.prestashop-project.org/1-5-documentation/documentation-francaise/guide-de-lintegrateur/pages/-MEbUSgM_k1NeMYaaSVO#Intégrerducontenudansunepageàl%27aidedehooks-Visualiserl%27emplacementdesprincipauxhooks)
    * [Zones principales de contenu](https://docs.prestashop-project.org/1-5-documentation/documentation-francaise/guide-de-lintegrateur/pages/-MEbUSgM_k1NeMYaaSVO#Intégrerducontenudansunepageàl%27aidedehooks-Zonesprincipalesdecontenu)
    * [En-tête de la page](https://docs.prestashop-project.org/1-5-documentation/documentation-francaise/guide-de-lintegrateur/pages/-MEbUSgM_k1NeMYaaSVO#Intégrerducontenudansunepageàl%27aidedehooks-En-têtedelapage)
    * [Colonne de gauche](https://docs.prestashop-project.org/1-5-documentation/documentation-francaise/guide-de-lintegrateur/pages/-MEbUSgM_k1NeMYaaSVO#Intégrerducontenudansunepageàl%27aidedehooks-Colonnedegauche)
    * [Zone centrale](https://docs.prestashop-project.org/1-5-documentation/documentation-francaise/guide-de-lintegrateur/pages/-MEbUSgM_k1NeMYaaSVO#Intégrerducontenudansunepageàl%27aidedehooks-Zonecentrale)
    * [Colonne de droite](https://docs.prestashop-project.org/1-5-documentation/documentation-francaise/guide-de-lintegrateur/pages/-MEbUSgM_k1NeMYaaSVO#Intégrerducontenudansunepageàl%27aidedehooks-Colonnededroite)
    * [Catégories](https://docs.prestashop-project.org/1-5-documentation/documentation-francaise/guide-de-lintegrateur/pages/-MEbUSgM_k1NeMYaaSVO#Intégrerducontenudansunepageàl%27aidedehooks-Catégories)

## Intégrer du contenu dans une page à l'aide de hooks <a href="#integrerducontenudansunepagealaidedehooks-integrerducontenudansunepagealaidedehooks" id="integrerducontenudansunepagealaidedehooks-integrerducontenudansunepagealaidedehooks"></a>

Les points d'accroche, ou "hooks", permettent d'associer votre code à des évènements propres à PrestaShop.

La plupart du temps, ils sont utilisés pour insérer du contenu dans la page.

Par exemple, le thème par défaut de PrestaShop dispose des hooks suivants :

| Hook name          | Description                                      |
| ------------------ | ------------------------------------------------ |
| displayHeader      | Displays the content in the page's header area.  |
| displayTop         | Displays the content in the page's top area.     |
| displayLeftColumn  | Displays the content in the page's left column.  |
| displayHome        | Displays the content in the page's central area. |
| displayRightColumn | Displays the content in the page's right column. |
| displayFooter      | Displays the content in the page's footer area.  |

Les hooks peuvent également être utilisés pour lancer des actions précises en fonction des circonstances (par exemple, envoyer un e-mail au client).

### Hooks existants : front-office <a href="#integrerducontenudansunepagealaidedehooks-hooksexistants-front-office" id="integrerducontenudansunepagealaidedehooks-hooksexistants-front-office"></a>

#### Page d'accueil et pages générales du site <a href="#integrerducontenudansunepagealaidedehooks-pagedaccueiletpagesgeneralesdusite" id="integrerducontenudansunepagealaidedehooks-pagedaccueiletpagesgeneralesdusite"></a>

| Hook name          | Description                                                                             |
| ------------------ | --------------------------------------------------------------------------------------- |
| displayHeader      | Called within the HTML \<head> tag. Ideal location for adding JavaScript and CSS files. |
| displayTop         | Called in the page's header.                                                            |
| displayLeftColumn  | Called when loading the left column.                                                    |
| displayRightColumn | Called when loading the right column.                                                   |
| displayFooter      | Called in the page's footer.                                                            |
| displayHome        | Called at the center of the homepage.                                                   |

#### Page produit <a href="#integrerducontenudansunepagealaidedehooks-pageproduit" id="integrerducontenudansunepagealaidedehooks-pageproduit"></a>

| Hook name                 | Description                                                                                       |
| ------------------------- | ------------------------------------------------------------------------------------------------- |
| displayLeftColumnProduct  | Called right before the "Print" link, under the picture.                                          |
| displayRightColumnProduct | Called right after the block for the "Add to Cart" button.                                        |
| displayProductButtons     | Called inside the block for the "Add to Cart" button, right after that button.                    |
| actionProductOutOfStock   | Called inside the block for the "Add to Cart" button, right after the "Availability" information. |
| displayFooterProduct      | Called right before the tabs.                                                                     |
| displayProductTab         | Called in tabs list, such as "More info", "Data sheet", "Accessories", etc.                       |
| displayProductTabContent  | Called when a tab is clicked.                                                                     |

#### Page du panier <a href="#integrerducontenudansunepagealaidedehooks-pagedupanier" id="integrerducontenudansunepagealaidedehooks-pagedupanier"></a>

| Hook name                     | Description                                                                                                                                         |
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| actionCartSave                | Called right after a cart creation or update.                                                                                                       |
| displayShoppingCartFooter     | Called right below the cart items table.                                                                                                            |
| displayShoppingCart           | Called after the cart's table of items, right above the navigation buttons.                                                                         |
| displayCustomerAccountFormTop | Called within the client account creation form, right above the "Your personal information" block.                                                  |
| displayCustomerAccountForm    | Called within the client account creation form, right before the "Register" button.                                                                 |
| actionCustomerAccountAdd      | Called right after the client account creation.                                                                                                     |
| displayCustomerAccount        | Called on the client account homepage, after the list of available links. Ideal location to add a link to this list.                                |
| displayMyAccountBlock         | Called within the "My account" block, in the left column, below the list of available links. This is the ideal location to add a link to this list. |
| displayMyAccountBlockfooter   | Displays extra information inside the "My account" block.                                                                                           |
| actionAuthentication          | Called right after the client identification, only if the authentication is valid (e-mail address and password are both OK).                        |
| actionBeforeAuthentication    | Called right before authentication.                                                                                                                 |

#### Page de recherche <a href="#integrerducontenudansunepagealaidedehooks-pagederecherche" id="integrerducontenudansunepagealaidedehooks-pagederecherche"></a>

| Hook name    | Description                                                                                             |
| ------------ | ------------------------------------------------------------------------------------------------------- |
| actionSearch | Called after a search is performed. Ideal location to parse and/or handle the search query and results. |

#### Page de choix du transport <a href="#integrerducontenudansunepagealaidedehooks-pagedechoixdutransport" id="integrerducontenudansunepagealaidedehooks-pagedechoixdutransport"></a>

| Hook name            | Description                                                                                                                   |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| displayBeforeCarrier | Displayed before the carrier list on front-office.                                                                            |
| displayCarrierList   | Called after the list of available carriers, during the order process. Ideal location to add a carrier, as added by a module. |

#### Page de paiement <a href="#integrerducontenudansunepagealaidedehooks-pagedepaiement" id="integrerducontenudansunepagealaidedehooks-pagedepaiement"></a>

| Hook name                | Description                                                                                                                                                                         |
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| displayPaymentTop        | Top of payment page.                                                                                                                                                                |
| displayPayment           | Called when needing to build a list of the available payment solutions, during the order process. Ideal location to enable the choice of a payment module that you have developed.  |
| displayPaymentReturn     | Called when the user is sent back to the store after having paid on the 3rd-party website. Ideal location to display a confirmation message or to give some details on the payment. |
| displayOrderConfirmation | A duplicate of paymentReturn.                                                                                                                                                       |
| displayBeforePayment     | Called when displaying the list of available payment solutions. Ideal location to redirect the user instead of displaying said list (i.e., 1-click PayPal checkout).                |

#### Page de commande <a href="#integrerducontenudansunepagealaidedehooks-pagedecommande" id="integrerducontenudansunepagealaidedehooks-pagedecommande"></a>

| Hook name         | Description                                                                                             |
| ----------------- | ------------------------------------------------------------------------------------------------------- |
| actionOrderReturn | Called when the customer request to send his merchandise back to the store, and if now error occurs.    |
| displayPDFInvoice | Called when displaying the invoice in PDF format. Ideal location to display content within the invoice. |

### Hooks existants : back-office <a href="#integrerducontenudansunepagealaidedehooks-hooksexistants-back-office" id="integrerducontenudansunepagealaidedehooks-hooksexistants-back-office"></a>

#### Hooks généraux <a href="#integrerducontenudansunepagealaidedehooks-hooksgeneraux" id="integrerducontenudansunepagealaidedehooks-hooksgeneraux"></a>

| Hook name               | Description                                                                       |
| ----------------------- | --------------------------------------------------------------------------------- |
| displayBackOfficeTop    | Called within the header, above the tabs.                                         |
| displayBackOfficeHeader | Called between the HEAD tags. Ideal location for adding JavaScript and CSS files. |
| displayBackOfficeFooter | Called within the page footer, above the "Power By PrestaShop" line.              |
| displayBackOfficeHome   | Called at the center of the homepage.                                             |

#### Commandes et détails de la commande <a href="#integrerducontenudansunepagealaidedehooks-commandesetdetailsdelacommande" id="integrerducontenudansunepagealaidedehooks-commandesetdetailsdelacommande"></a>

| Hook name                   | Description                                                                        |
| --------------------------- | ---------------------------------------------------------------------------------- |
| actionValidateOrder         | Called during the new order creation process, right after it has been created.     |
| actionPaymentConfirmation   | Called when an order's status becomes "Payment accepted".                          |
| actionOrderStatusUpdate     | Called when an order's status is changed, right before it is actually changed.     |
| actionOrderStatusPostUpdate | Called when an order's status is changed, right after it is actually changed.      |
| actionProductCancel         | Called when an item is deleted from an order, right after the deletion.            |
| displayInvoice              | Called when the order's details are displayed, above the Client Information block. |
| displayAdminOrder           | Called when the order's details are displayed, below the Client Information block. |
| actionOrderSlipAdd          | Called during the creation of a credit note, right after it has been created.      |

#### Produits <a href="#integrerducontenudansunepagealaidedehooks-produits" id="integrerducontenudansunepagealaidedehooks-produits"></a>

| Hook name                        | Description                                                                                                                                            |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| actionProductSave                | Called when saving products.                                                                                                                           |
| actionUpdateQuantity             | Called during the validation of an order, the status of which being something other than "canceled" or "Payment error", for each of the order's items. |
| actionProductAttributeUpdate     | Called when a product declination is updated, right after said update.                                                                                 |
| actionProductAttributeDelete     | Called when a product declination is deleted.                                                                                                          |
| actionWatermark                  | Called when an image is added to a product, right after said addition.                                                                                 |
| displayAttributeForm             | Add fields to the form "attribute value".                                                                                                              |
| displayAttributeGroupForm        | Add fields to the form "attribute group".                                                                                                              |
| displayAttributeGroupPostProcess | Called when post-process in admin attribute group.                                                                                                     |
| displayFeatureForm               | Add fields to the form "feature".                                                                                                                      |
| displayFeaturePostProcess        | Called when post-process in admin feature.                                                                                                             |
| displayFeatureValueForm          | Add fields to the form "feature value".                                                                                                                |
| displayFeatureValuePostProcess   | Called when post-process in admin feature value.                                                                                                       |

#### Statistiques <a href="#integrerducontenudansunepagealaidedehooks-statistiques" id="integrerducontenudansunepagealaidedehooks-statistiques"></a>

| Hook name                    | Description                                         |
| ---------------------------- | --------------------------------------------------- |
| displayAdminStatsGraphEngine | Called when a stats graph is displayed.             |
| displayAdminStatsGridEngine  | Called when the grid of stats is displayed.         |
| displayAdminStatsModules     | Called when the list of stats modules is displayed. |

#### Clients <a href="#integrerducontenudansunepagealaidedehooks-clients" id="integrerducontenudansunepagealaidedehooks-clients"></a>

| Hook name             | Description                                                                                                             |
| --------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| displayAdminCustomers | Called when a client's details are displayed, right after the list of the clients groups the current client belongs to. |

#### Transporteurs <a href="#integrerducontenudansunepagealaidedehooks-transporteurs" id="integrerducontenudansunepagealaidedehooks-transporteurs"></a>

| Hook name           | Description                                                |
| ------------------- | ---------------------------------------------------------- |
| actionCarrierUpdate | Called during a carrier's update, right after said update. |

### Visualiser l'emplacement des principaux hooks <a href="#integrerducontenudansunepagealaidedehooks-visualiserlemplacementdesprincipauxhooks" id="integrerducontenudansunepagealaidedehooks-visualiserlemplacementdesprincipauxhooks"></a>

L'un des principaux aspects de l'intégration du contenu de PrestaShop dans votre thème, consiste à savoir où votre contenu sera affiché, et donc à savoir où exactement se trouvent les hooks et modules.

Cette section vous donne une représentation visuelle de leur position sur la page d'accueil. Elle vous indique

* le nom du bloc ;
* l'identifiant du bloc, afin de le cibler en CSS ;
* le dossier du bloc ou son fichier template, si vous souhaitez le modifier.

#### Zones principales de contenu <a href="#integrerducontenudansunepagealaidedehooks-zonesprincipalesdecontenu" id="integrerducontenudansunepagealaidedehooks-zonesprincipalesdecontenu"></a>

![](https://2105846932-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fprestashop-1-5-documentations%2F-MEbUB2GbdU68Aa0-FPo%2F-MEbUSma9xgU3HeKUR-x%2F14581832.png?generation=1597316686320707\&alt=media)

#### En-tête de la page <a href="#integrerducontenudansunepagealaidedehooks-en-tetedelapage" id="integrerducontenudansunepagealaidedehooks-en-tetedelapage"></a>

![](https://2105846932-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fprestashop-1-5-documentations%2F-MEbUB2GbdU68Aa0-FPo%2F-MEbUSmcp_gEgeg7MLGC%2F14581834.png?generation=1597316685226815\&alt=media)

#### Colonne de gauche <a href="#integrerducontenudansunepagealaidedehooks-colonnedegauche" id="integrerducontenudansunepagealaidedehooks-colonnedegauche"></a>

#### Zone centrale <a href="#integrerducontenudansunepagealaidedehooks-zonecentrale" id="integrerducontenudansunepagealaidedehooks-zonecentrale"></a>

![](https://2105846932-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fprestashop-1-5-documentations%2F-MEbUB2GbdU68Aa0-FPo%2F-MEbUSm_OGSXrX_neS2g%2F14581830.png?generation=1597316686206718\&alt=media)

#### Colonne de droite <a href="#integrerducontenudansunepagealaidedehooks-colonnededroite" id="integrerducontenudansunepagealaidedehooks-colonnededroite"></a>

![](https://2105846932-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fprestashop-1-5-documentations%2F-MEbUB2GbdU68Aa0-FPo%2F-MEbUSmbTIr6_N1C_0Nd%2F14581833.png?generation=1597316685795772\&alt=media)

#### Catégories <a href="#integrerducontenudansunepagealaidedehooks-categories" id="integrerducontenudansunepagealaidedehooks-categories"></a>

![](https://2105846932-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fprestashop-1-5-documentations%2F-MEbUB2GbdU68Aa0-FPo%2F-MEbUSmZmHczQNAkWrpQ%2F14581829.png?generation=1597316686342395\&alt=media)
