...
Front-office and back-office
...
Existing front-office hooks
...
Home page and general
...
site pages
Hook name | File location | Visible | Description | |||
---|---|---|---|---|---|---|
header | header.php | No | Called between the HEAD displayHeader | Called within the HTML <head> tags. Ideal location for adding JavaScript and CSS files. | ||
top | header.php | Yes | displayTop | Called in the page's header. | ||
leftColumn | header.php | Yes | displayLeftColumn | Called when loading the left column. | rightColumn | footer.php |
Yes | displayRightColumn | Called when loading the right column. | ||||
footer | footer.php | Yes | displayFooter | Called in the page's footer. | ||
home | index.php | Yes | displayHome | Called at the center of the homepage. |
Product
...
page
Hook name | File location | Visible | Description | |||||
---|---|---|---|---|---|---|---|---|
extraLeft | product.php | Yes | displayLeftColumnProduct | Called right before the "Print" link, under the picture. | ||||
extraRight | product.php | Yes | displayRightColumnProduct | Called right after the block for the "Add to Cart" button. | ||||
productActions | product.php | Yes | displayProductButtons | Called inside the block for the "Add to Cart" button, right after that button. | ||||
productOutOfStock | product.php | Yes | actionProductOutOfStock | Called inside the block for the "Add to Cart" button, right after the "Availability" information. | ||||
productfooter | product.php | Yes | displayFooterProduct | Called right before the tabs. | ||||
productTab | product.php | Yes | displayProductTab | Called in tabs list, such as "More info", "Data sheet", "Accessories"... Ideal location for one more tab, the content of which is handled by the productTabContent hook. | productTabContent | product.php | Yes | , etc. |
displayProductTabContent | Called when a tab is clicked. Ideal location for the content of a tab that has been defined using the productTab hook. |
Cart page
Hook name | File location | Visible | Description | |||
---|---|---|---|---|---|---|
cart | Class: Cart.php | No | actionCartSave | Called right after a cart creation or update. | ||
shoppingCart | order.php | Yes | displayShoppingCartFooter | Called right below the cart items table. | ||
shoppingCartExtra | order.php | Yes | displayShoppingCart | Called after the cart's table of items, right above the navigation buttons. | ||
createAccountTop | authentication.php | Yes | displayCustomerAccountFormTop | Called within the client account creation form, right above the the "Your personal information" block. | ||
createAccountForm | authentication.php | Yes | displayCustomerAccountForm | Called within the client account creation form, right before the "Register" button. | ||
createAccount | authentication.php | No | actionCustomerAccountAdd | Called right after the client account creation. | ||
customerAccount | my-account.php | Yes | displayCustomerAccount | Called on the client account homepage, after the list of available links. Ideal location to add a link to this list. | ||
myAccountBlock | Module: blockmyaccount.php | Yes | displayMyAccountBlock | Called within the "My account" block, in the left column, below the list of available links. Ideal This is the ideal location to add a link to this list. | authentication | authentication.php |
NodisplayMyAccountBlockfooter | 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. |
Search page
Hook name | File location | Visible | Description | |
---|---|---|---|---|
search | Class: Search.php | No | actionSearch | Called after a search is performed. Ideal location to parse and/or handle the search query and results. |
Carrier choice page
Hook name | File location | Visible | Description |
---|---|---|---|
extraCarrier | order.php | YesdisplayBeforeCarrier | 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. |
Payment page
Hook name | File locationDescriptionVisible | |||
---|---|---|---|---|
displayPaymentTop | Description | payment | order.php | YesTop 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. | |||
paymentReturn | order-confirmation.php | Yes | 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. |
orderConfirmation | order-confirmation.php | Yes | displayOrderConfirmation | A duplicate of paymentReturn. |
backBeforePayment | order.php | No | 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).. |
...
Order page
Hook name | File location | Visible | Description | |
---|---|---|---|---|
orderReturn | order-follow.php | No | actionOrderReturn | Called when the customer request to send his merchandise back to the store, and if now error occurs. |
PDFInvoice | Class: PDF.php | Yes | displayPDFInvoice | Called when displaying the invoice in PDF format. Ideal location to display dynamic or static content within the invoice. |
...
Existing back-office hooks
General hooks
Hook name | File location | Visible | Description | |
---|---|---|---|---|
backOfficeTop | header.inc.php | Yes | displayBackOfficeTop | Called within the header, above the tabs. |
backOfficeHeader | header.inc.php | No | displayBackOfficeHeader | Called between the HEAD tags. Ideal location for adding JavaScript and CSS files. |
backOfficeFooter | footer.inc.php | Yes | displayBackOfficeFooter | Called within the page footer, above the "Power By PrestaShop" line. |
backOfficeHome | index.php | Yes | displayBackOfficeHome | Called at the center of the homepage. |
Orders and order details
Hook name | File location | Visible | Description | |||
---|---|---|---|---|---|---|
newOrder | Class: PaymentModule.php | No | actionValidateOrder | Called during the new order creation process, right after it has been created. | ||
paymentConfirm | Class: Hook.php | No | actionPaymentConfirmation | Called when an order's status becomes "Payment accepted". | ||
updateOrderStatus | Class: OrderHistory.php | No | actionOrderStatusUpdate | Called when an order's status is changed, right before it is actually changed. | postUpdateOrderStatus | Class: OrderHistory.php |
No | actionOrderStatusPostUpdate | Called when an order's status is changed, right after it is actually changed. | ||||
cancelProduct | AdminOrders.php | No | actionProductCancel | Called when an item is deleted from an order, right after the deletion. | ||
invoice | AdminOrders.php | Yes | displayInvoice | Called when the order's details are displayed, above the Client Information block. | adminOrder | AdminOrders.php |
Yes | displayAdminOrder | Called when the order's details are displayed, below the Client Information block. | ||||
orderSlip | AdminOrders.php | No | actionOrderSlipAdd | Called during the creation of a credit note, right after it has been created. |
Products
Hook name | File location | Visible | Description | |||
---|---|---|---|---|---|---|
addproduct | AdminProducts.php | No | Called when a product is created or duplicated, right after said creation/duplication. | |||
updateproduct | AdminProducts.php | No | Called when a product is update with a new picture, right after said update. | |||
deleteproduct | Class: Product.php | No | Called when a product is deleted, right before said deletion.. | |||
updateQuantity | Class: PaymentModule.php | No | Called actionProductSave | Called when saving products. | ||
actionUpdateQuantity | Called during an the validation of an order, the status of which being something other than "canceled" or "Payment error", for each of the order's items. | |||||
updateProductAttribute | Class: Product.php | No | actionProductAttributeUpdate | Called when a product declination is updated, right after said update. | watermark | AdminProducts.php |
NoactionProductAttributeDelete | Called when a product declination is deleted. | |||||
actionWatermark | Called when an image is added to an a product, right after said addition. |
Statistics
Hook name | File location | Visible | Description | |
---|---|---|---|---|
GraphEngine | Class: ModuleGraph.php | Yes | Called when 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. |
Statistics
Hook name | Description | |||
---|---|---|---|---|
displayAdminStatsGraphEngine | Called when a stats graph is displayed. | |||
GridEngine | Module: GridEngine.php | Yes | displayAdminStatsGridEngine | Called when the grid of stats is displayed. |
AdminStatsModules | AdminStatsTab.php | Yes | displayAdminStatsModules | Called when the list of stats modules is displayed. |
Clients
Hook name | File location | Visible | Description | |
---|---|---|---|---|
adminCustomers | AdminCustomers.php | Yes | displayAdminCustomers | Called when a client's details are displayed, right after the list of the clients groups the current client belongs to. |
Carriers
Hook name | File location | Visible | Description | |
---|---|---|---|---|
updateCarrier | AdminCarriers.php | No | actionCarrierUpdate | Called during a carrier's update, right after said update. |