Child pages
  • Hooks in PrestaShop 1.5

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents
maxLevel23

Hooks in PrestaShop 1.5

Hooks in PrestaShop 1.5 have a new naming scheme, with a situation-specific prefix:

  • action. These hooks are triggered by specific events that take place in PrestaShop.
  • display. These hooks result in something being displayed, either in the front-end or the back-end.

This way, you will know right away what type of hook you are dealing with. Older hooks have been renamed to match this scheme.

Note

The following lists were automatically generated by a script. Hook descriptions appear as they are in the PrestaShop database, and can sometimes be missing.

New & updated hooks since v1.4

All hooks in PrestaShop have been updated for version 1.5, and several new ones were added.

New hooks since v1.4

Hook name

Hook description

What to expect in $params? (Pseudocode)
actionAdminMetaControllerUpdate_optionsBefore  
actionAdminMetaSaveAfter saving configuration in AdminMeta.

actionAttributeDelete

On deleting attribute feature value

actionAttributeGroupDelete

On deleting attribute group

actionAttributeGroupSave

On saving attribute group

actionAttributePostProcess

On post-process in admin feature value

actionAttributeSave

On saving attribute feature value

actionAuthentication

 

N/A
actionAuthenticationAfter authentication.N/A
actionBeforeAuthenticationBefore authentication.

actionCarrierProcess

 

actionCarrierUpdate

This hook is called when a carrier is updated

actionCartSave

 

actionCategoryAdd

 

actionCategoryDelete

 

actionCategoryUpdate

 

N/A
actionCartSaveAfter saving the Cart object.N/A
actionCustomerAccountAddCalled when a new customer successfully creates account

actionFeatureDelete

On deleting attribute feature

actionFeatureSave

On saving attribute feature

actionFeatureValueDelete

On deleting attribute feature value

actionFeatureValueSave

On saving attribute feature value

.
array(
    '_POST' => (array) $_POST,
    'newCustomer' => (object) Customer object
);
actionHtaccessCreateAfter .htaccess creation.

actionObjectCategoryDeleteAfter

 

actionObjectCategoryUpdateAfter

 

actionObjectCmsDeleteAfter

 

actionObjectCmsUpdateAfter

 

actionObjectManufacturerDeleteAfter

 

actionObjectManufacturerUpdateAfter

 

actionObjectProductDeleteAfter

 

actionObjectProductUpdateAfter

 

actionObjectSupplierDeleteAfter

 

actionObjectSupplierUpdateAfter

 

N/A
actionObjectCategoryDeleteAfterNot invoked by the PrestaShop core itself - can be used after deleting a category to notify the Horizonal Top Menu.N/A
actionObjectCategoryUpdateAfterNot invoked by the PrestaShop core itself - can be used after updating a category to notify the Horizontal Top Menu.N/A
actionObjectCmsDeleteAfterNot invoked by the PrestaShop core itself - can be used after deleting a CMS page to notify the Horizontal Top Menu.N/A
actionObjectCmsUpdateAfterNot invoked by the PrestaShop core itself - can be used after deleting a CMS page to notify the Horizontal Top Menu.N/A
actionObjectManufacturerDeleteAfterNot invoked by the PrestaShop core itself - can be used after deleting a manufacturer to notify the Horizontal Top Menu.N/A
actionObjectManufacturerUpdateAfterNot invoked by the PrestaShop core itself - can be used after updating a manufacturer to notify the Horizontal Top Menu.N/A
actionObjectProductDeleteAfterNot invoked by the PrestaShop core itself - can be used after deleting a product to notify the Horizontal Top Menu.N/A
actionObjectProductUpdateAfterNot invoked by the PrestaShop core itself - can be used after updating a product to notify the Horizontal Top Menu.N/A
actionObjectSupplierDeleteAfterNot invoked by the PrestaShop core itself - can be used after deleting a supplier to notify the Horizontal Top Menu.N/A
actionObjectSupplierUpdateAfterNot invoked by the PrestaShop core itself - can be used after updating a supplier to notify the Horizontal Top Menu.N/A
actionOrderDetailTo set the follow-up in Smarty when order detail is called.

actionOrderReturn

 

array(
    'carrier' => (object) Carrier object,
    'order' => (object) Order object
);
actionOrderReturnCalled after a new Order Return has been made.
array(
    'orderReturn' => (object) OrderReturn object
);
actionOrderSlipAddCalled when a the quantity of one a product change changes in an order.

actionOrderStatusPostUpdate

 

actionOrderStatusUpdate

Launch modules when the order's status changes.

actionPaymentCCAdd

Payment CC added

actionPaymentConfirmation

 

actionProductAdd

 

actionProductAttributeDelete

 

actionProductAttributeUpdate

 

actionProductCancel

This hook is called when you cancel a product in an order

actionProductDelete

This hook is called when a product is deleted

actionProductListOverride

Assign product list to a category

actionProductOutOfStock

Make action while product is out of stock

actionProductSave

On saving products

actionProductUpdate

 

actionSearch

 

actionShopDataDuplication

 

actionTaxManager

 

actionUpdateQuantity

Quantity is updated only when the customer effectively place his order.

actionValidateOrder

 

actionWatermark

 

displayAdminCustomers

Launch modules when the tab AdminCustomers is displayed on back-office.

displayAdminOrder

Launch modules when the tab AdminOrder is displayed on back-office.

displayAdminStatsGraphEngine

 

displayAdminStatsGridEngine

 

displayAdminStatsModules

 

displayAttributeForm

Add fields to the form "attribute value"

displayAttributeGroupForm

Add fields to the form "attribute group"

displayAttributeGroupPostProcess

On post-process in admin attribute group

displayBackOfficeFooter

 

displayBackOfficeHeader

 

displayBackOfficeHome

 

displayBackOfficeTop

 

displayBeforeCarrier

This hook is display before the carrier list on Front office

WARNING: only invoked when a product is actually removed from an order.
array(
    'order' => Order oject,
    'productList' => array(
        (int) product ID 1,
(int) product ID 2,
...,
(int) product ID n ), 'qtyList' => array( (int) quantity 1,
(int) quantity 2,
...,
(int) quantity n 
    )
);

The order of IDs and quantities is important!

actionOrderStatusPostUpdateCalled after the status of an order changes.
array(
    'newOrderStatus' => (object) OrderState object,
'id_order' => (int) Order ID
);
actionOrderStatusUpdateCalled before the status of an order changes.
array(
    'newOrderStatus' => (object) OrderState object,
    'id_order' => (int) Order ID
);
actionPaymentCCAddPayment CC added
array(
    'paymentCC' => (object) OrderPayment object
);
actionPaymentConfirmationCalled after a payment has been validated
array(
    'id_order' => (int) Order ID
);
actionSearch

After the search in the store. Includes both instant and normal search.

array(
    'expr' => (string) Search query,
    'total' => (int) Amount of search results
);
actionShopDataDuplicationAfter duplicating a shop.
array(
    'old_id_shop' => (int) Old shop ID,
    'new_id_shop' => (int) New shop ID
);
actionTaxManagerNot used by PrestaShop core.N/A
actionUpdateQuantityAfter updating the quantity of a product.
array(
    'id_product' => (int) Product ID,
    'id_product_attribute' => (int) Product attribute ID,
    'quantity' => (int) New product quantity
);
actionValidateOrderAfter an order has been validated. Doesn't necessarily have to be paid.
array(
    'cart' => (object) Cart object,
    'order' => (object) Order object,
    'customer' => (object) Customer object,
    'currency' => (object) Currency object,
    'orderStatus' => (object) OrderState object
);
actionWatermarkAfter a watermark has been added to an image.
array(
    'id_image' => (int) Image ID,
    'id_product' => (int) Product ID
);
displayAdminCustomersCan be used by modules when the tab AdminCustomers is displayed in the Back Office.
array(
'id_customer' = (int) Customer ID
); 
displayAdminOrderCan be used by modules when the tab AdminOrder is displayed in the Back Office.
array(
'id_order' = (int) Order ID
); 
displayAdminStatsGraphEngineNot used by PrestaShop core.N/A
displayAdminStatsGridEngineNot used by PrestaShop core.N/A
displayAdminStatsModulesUsed when the statistics page in the Back Office is shown.N/A
displayBackOfficeFooterDisplayed right before the Back Office footer.N/A
displayBackOfficeHeaderDisplayed between the <head></head> tags on every Back Office page (when logged in).N/A
displayBackOfficeHomeDisplayed on the dashboard page of the Back Office.N/A
displayBackOfficeTopShown above the actual content of a Back Office pageN/A
displayBeforeCarrierThis hook is displayed before the carrier list on the Front Office
array(
'carriers' => array(
array(
'name' => (string) Name,
'img' => (string) Image URL,
'delay' => (string) Delay text,
'price' =>  (float) Total price with tax,
'price_tax_exc' => (float) Total price without tax,
'id_carrier' => (int) intified option delivery identifier,
'id_module' => (int) Module ID
)),
'checked' => (int) intified selected carriers,
'delivery_option_list' => array(array(
0 => array( // First address
'12,' => array( // First delivery option available for this address
carrier_list => array(
12 => array( // First carrier for this option
'instance' => Carrier Object,
'logo' => <url to the carrier's logo>,
'price_with_tax' => 12.4, // Example
'price_without_tax' => 12.4, // Example
'package_list' => array(
1, // Example
3, // Example
),
),
),
is_best_grade => true, // Does this option have the biggest grade (quick shipping) for this shipping address
is_best_price => true, // Does this option have the lower price for this shipping address
unique_carrier => true, // Does this option use a unique carrier
total_price_with_tax => 12.5,
total_price_without_tax => 12.5,
position => 5, // Average of the carrier position
),
),
)),
'delivery_option' => array(
'<id_address>' => Delivery option,
...
)
); 
NOTE: intified means an array of integers 'intified' by Cart::intifier
displayBeforePaymentRedirect user to the module instead of displaying payment modules

displayCarrierList

 

array(
    'module' => (string) Module link [e.g. /module/test/front]
);
displayCarrierListDisplay extra carriers in the carrier list.
array(
    'address' => (object) Address object
);
displayCustomerAccountDisplay on page account of the customer.N/A
displayCustomerAccountFormDisplay some information on the form to create a customer account.N/A
displayCustomerAccountFormTop

 

displayFeatureForm

Add fields to the form "feature"

displayFeaturePostProcess

On post-process in admin feature

displayFeatureValueForm

Add fields to the form "feature value"

displayFeatureValuePostProcess

On post-process in admin feature value

Display some information on the top of the form to create a customer account.N/A
displayFooterAdd block in footer.N/A
displayFooterProductAdd new blocks under the product description.N/A
displayHeaderA hook which allow you to do things in the header of each pages

displayHome

 

every page.N/A
displayHomeDisplay on content of home page.N/A
displayInvoiceAdd blocks to invoice (order).N/A
displayLeftColumn

 

displayLeftColumnProduct

 

Display in left column.N/A
displayLeftColumnProductDisplay in left column on product page (not to be confused with the general left column).N/A
displayMyAccountBlockDisplay extra information inside the "my account" blockN/A
displayMyAccountBlockfooterDisplay extra information inside the "my account" blockN/A
displayOrderConfirmationCalled on order confirmation page
array(
    'total_to_pay' => (float) Total amount with tax,
    'currency' => (string) Currency sign,
    'objOrder' => (object) Order object,
    'currencyObj' => (object) Currency object
);
displayOrderDetailDisplayed on order detail on front office
array(
    'order' => (object) Order object
);
displayPaymentDisplayed on payment pageN/A
displayPaymentReturnDisplayed on payment return page
array(
    'total_to_pay' => (float) Total amount with tax,
    'currency' => (string) Currency sign,
    'objOrder' => (object) Order object,
    'currencyObj' => (object) Currency object
);
displayPaymentTopTop of payment pageN/A
displayPDFInvoiceAllow the display of extra information into the PDF invoice

displayPayment

 

displayPaymentReturn

 

displayPaymentTop

Top of payment page

N/A
displayProductButtonsPut new action buttons on product pageN/A
displayProductComparisonExtra Product ComparisonN/A
displayProductTabCalled on order product page tabsN/A
displayProductTabContentCalled on order product page tabs

displayRightColumn

 

displayRightColumnProduct

 

displayShoppingCart

Display some specific information

array(
    'product' => (object) Product object
);
displayRightColumnDisplayed in right column.
array(
    'cart' => (object) Cart object
);

Note that the Cart object can also be retrieved from the current Context.

displayRightColumnProductDisplay in right column on product page (not to be confused with the general right column).N/A
displayShoppingCartDisplay some specific information
array(
'delivery' => $delivery,
'delivery_state' => State::getNameById($delivery->id_state),
'invoice' => $invoice,
'invoice_state' => State::getNameById($invoice->id_state),
'formattedAddresses' => $formatted_addresses,
'products' => array_values($products),
'gift_products' => $gift_products,
'discounts' => $cart_rules,
'is_virtual_cart' => (int)$this->isVirtualCart(),
'total_discounts' => $total_discounts,
'total_discounts_tax_exc' => $total_discounts_tax_exc,
'total_wrapping' => $this->getOrderTotal(true, Cart::ONLY_WRAPPING),
'total_wrapping_tax_exc' => $this->getOrderTotal(false, Cart::ONLY_WRAPPING),
'total_shipping' => $total_shipping,
'total_shipping_tax_exc' => $total_shipping_tax_exc,
'total_products_wt' => $total_products_wt,
'total_products' => $total_products,
'total_price' => $base_total_tax_inc,
'total_tax' => $total_tax,
'total_price_without_tax' => $base_total_tax_exc,
'is_multi_address_delivery' => $this->isMultiAddressDelivery() || ((int)Tools::getValue('multi-shipping') == 1),
'free_ship' => $total_shipping ? 0 : 1,
'carrier' => new Carrier($this->id_carrier, $id_lang),
);

Can be found in /classes/Cart.php

displayShoppingCartFooterDisplay some specific information on the shopping cart page

displayTop

A hook which enables you to do things at the top of each page.

...

array(
'delivery' => $delivery,
'delivery_state' => State::getNameById($delivery->id_state),
'invoice' => $invoice,
'invoice_state' => State::getNameById($invoice->id_state),
'formattedAddresses' => $formatted_addresses,
'products' => array_values($products),
'gift_products' => $gift_products,
'discounts' => $cart_rules,
'is_virtual_cart' => (int)$this->isVirtualCart(),
'total_discounts' => $total_discounts,
'total_discounts_tax_exc' => $total_discounts_tax_exc,
'total_wrapping' => $this->getOrderTotal(true, Cart::ONLY_WRAPPING),
'total_wrapping_tax_exc' => $this->getOrderTotal(false, Cart::ONLY_WRAPPING),
'total_shipping' => $total_shipping,
'total_shipping_tax_exc' => $total_shipping_tax_exc,
'total_products_wt' => $total_products_wt,
'total_products' => $total_products,
'total_price' => $base_total_tax_inc,
'total_tax' => $total_tax,
'total_price_without_tax' => $base_total_tax_exc,
'is_multi_address_delivery' => $this->isMultiAddressDelivery() || ((int)Tools::getValue('multi-shipping') == 1),
'free_ship' => $total_shipping ? 0 : 1,
'carrier' => new Carrier($this->id_carrier, $id_lang),
);

Can be found in /classes/Cart.php

Updated hooks since v1.4

Most of these hooks are the same as they were in version 1.4 of PrestaShop, but have been renamed with either an "action" or "display" prefix in order to be compatible with the new 1.5 naming scheme.

Note

The following "updated hooks" lists were automatically generated by a script. Hook descriptions appear as they are in the PrestaShop database, and can sometimes be missing.

Old hook name

New hook name

Hook description

AdminStatsModules

displayAdminStatsModules

 

GraphEngine

displayAdminStatsGraphEngine

 

GridEngine

displayAdminStatsGridEngine

 

PDFInvoice

displayPDFInvoice

Allow the display of extra information into the PDF invoice

addproduct

actionProductAdd

 

adminCustomers

displayAdminCustomers

Launch modules when the tab AdminCustomers is displayed on back-office.

adminOrder

displayAdminOrder

Launch modules when the tab AdminOrder is displayed on back-office.

afterCreateHtaccess

actionHtaccessCreate

After .htaccess creation

afterDeleteAttribute

actionAttributeDelete

On deleting attribute feature value

afterDeleteAttributeGroup

actionAttributeGroupDelete

On deleting attribute group

afterDeleteFeature

actionFeatureDelete

On deleting attribute feature

afterDeleteFeatureValue

actionFeatureValueDelete

On deleting attribute feature value

afterSaveAdminMeta

actionAdminMetaSave

After save configuration in AdminMeta

afterSaveAttribute

actionAttributeSave

On saving attribute feature value

afterSaveAttributeGroup

actionAttributeGroupSave

On saving attribute group

afterSaveFeature

actionFeatureSave

On saving attribute feature

afterSaveFeatureValue

actionFeatureValueSave

On saving attribute feature value

afterSaveProduct

actionProductSave

On saving products

attributeForm

displayAttributeForm

Add fields to the form "attribute value"

attributeGroupForm

displayAttributeGroupForm

Add fields to the form "attribute group"

authentication

actionAuthentication

 

backBeforePayment

displayBeforePayment

Redirect user to the module instead of displaying payment modules

backOfficeFooter

displayBackOfficeFooter

 

backOfficeHeader

displayBackOfficeHeader

 

backOfficeHome

displayBackOfficeHome

 

backOfficeTop

displayBackOfficeTop

 

beforeAuthentication

actionBeforeAuthentication

Before authentication

beforeCarrier

displayBeforeCarrier

This hook is display before the carrier list on Front office

cancelProduct

actionProductCancel

This hook is called when you cancel a product in an order

cart

actionCartSave

 

categoryAddition

actionCategoryAdd

 

categoryDeletion

actionCategoryDelete

 

categoryUpdate

actionCategoryUpdate

 

createAccount

actionCustomerAccountAdd

Called when a new customer successfully creates an account

createAccountForm

displayCustomerAccountForm

Display some information on the form to create a customer account

createAccountTop

displayCustomerAccountFormTop

 

customerAccount

displayCustomerAccount

Display on page account of the customer

deleteProductAttribute

actionProductAttributeDelete

 

deleteproduct

actionProductDelete

This hook is called when a product is deleted

extraCarrier

displayCarrierList

 

extraLeft

displayLeftColumnProduct

 

extraProductComparison

displayProductComparison

Extra Product Comparison

extraRight

displayRightColumnProduct

 

featureForm

displayFeatureForm

Add fields to the form "feature"

featureValueForm

displayFeatureValueForm

Add fields to the form "feature value"

footer

displayFooter

Add block in footer

header

displayHeader

A hook which allow you to do things in the header of each pages

home

displayHome

 

invoice

displayInvoice

Add blocks to invoice (order)

leftColumn

displayLeftColumn

 

myAccountBlock

displayMyAccountBlock

Display extra information inside the "my account" block

newOrder

actionValidateOrder

 

orderConfirmation

displayOrderConfirmation

Called on order confirmation page

orderDetail

actionOrderDetail

To set the follow-up in Smarty when order detail is called

orderDetailDisplayed

displayOrderDetail

Displayed on order detail on front office

orderReturn

actionOrderReturn

 

orderSlip

actionOrderSlipAdd

Called when a quantity of one product change in an order.

payment

displayPayment

 

paymentCCAdded

actionPaymentCCAdd

Payment CC added

paymentConfirm

actionPaymentConfirmation

 

paymentReturn

displayPaymentReturn

 

paymentTop

displayPaymentTop

Top of payment page

postProcessAttribute

actionAttributePostProcess

On post-process in admin feature value

postProcessAttributeGroup

displayAttributeGroupPostProcess

On post-process in admin attribute group

postProcessFeature

displayFeaturePostProcess

On post-process in admin feature

postProcessFeatureValue

displayFeatureValuePostProcess

On post-process in admin feature value

postUpdateOrderStatus

actionOrderStatusPostUpdate

 

processCarrier

actionCarrierProcess

 

productActions

displayProductButtons

Put new action buttons on product page

productListAssign

actionProductListOverride

Assign product list to a category

productOutOfStock

actionProductOutOfStock

Make action while product is out of stock

productTab

displayProductTab

Called on order product page tabs

productTabContent

displayProductTabContent

Called on order product page tabs

productfooter

displayFooterProduct

Add new blocks under the product description

rightColumn

displayRightColumn

 

search

actionSearch

 

shoppingCart

displayShoppingCartFooter

Display some specific information on the shopping cart page

shoppingCartExtra

displayShoppingCart

Display some specific information

taxManager

actionTaxManager

 

top

displayTop

A hook which allow you to do things at the top of each pages.

updateCarrier

actionCarrierUpdate

This hook is called when a carrier is updated

updateOrderStatus

actionOrderStatusUpdate

Launch modules when the order's status changes.

updateProductAttribute

actionProductAttributeUpdate

 

updateQuantity

actionUpdateQuantity

Quantity is updated only when the customer effectively place his order.

updateproduct

actionProductUpdate

 

watermark

actionWatermark

 

Front-office and back-office

These hooks are valid for both v1.4 and 1.5 of PrestaShop.

Existing front-office hooks

Home page and general site pages

Hook nameDescriptionWhat to expect in $params? (Pseudocode)
displayHeaderCalled within the HTML <head> tags. Ideal location for adding JavaScript and CSS files.N/A
displayTopCalled in the page's header.N/A
displayLeftColumnCalled when loading the left column.N/A
displayRightColumnCalled when loading the right column.
array(
    'cart' => (object) Cart object
);

Note that the Cart object can also be retrieved from the current Context.

displayFooterCalled in the page's footer.N/A
displayHomeCalled at the center of the homepage.N/A

Product page

Hook nameDescriptionWhat to expect in $params? (Pseudocode)
displayLeftColumnProductCalled right before the "Print" link, under the picture.N/A
displayRightColumnProductCalled right after the block for the "Add to Cart" button.N/A
displayProductButtonsCalled inside the block for the "Add to Cart" button, right after that button.N/A
actionProductOutOfStockCalled inside the block for the "Add to Cart" button, right after the "Availability" information.N/A
displayFooterProductCalled right before the tabs.N/A
displayProductTabCalled in tabs list, such as "More info", "Data sheet", "Accessories", etc.N/A
displayProductTabContentCalled when a tab is clicked.
array(
    'product' => (object) Product object
);

Cart page

Hook nameDescriptionWhat to expect in $params? (Pseudocode)
actionCartSaveCalled right after a cart creation or update.N/A
displayShoppingCartFooterCalled right below the cart items table.
array(
'delivery' => $delivery,
'delivery_state' => State::getNameById($delivery->id_state),
'invoice' => $invoice,
'invoice_state' => State::getNameById($invoice->id_state),
'formattedAddresses' => $formatted_addresses,
'products' => array_values($products),
'gift_products' => $gift_products,
'discounts' => $cart_rules,
'is_virtual_cart' => (int)$this->isVirtualCart(),
'total_discounts' => $total_discounts,
'total_discounts_tax_exc' => $total_discounts_tax_exc,
'total_wrapping' => $this->getOrderTotal(true, Cart::ONLY_WRAPPING),
'total_wrapping_tax_exc' => $this->getOrderTotal(false, Cart::ONLY_WRAPPING),
'total_shipping' => $total_shipping,
'total_shipping_tax_exc' => $total_shipping_tax_exc,
'total_products_wt' => $total_products_wt,
'total_products' => $total_products,
'total_price' => $base_total_tax_inc,
'total_tax' => $total_tax,
'total_price_without_tax' => $base_total_tax_exc,
'is_multi_address_delivery' => $this->isMultiAddressDelivery() || ((int)Tools::getValue('multi-shipping') == 1),
'free_ship' => $total_shipping ? 0 : 1,
'carrier' => new Carrier($this->id_carrier, $id_lang),
);

Can be found in /classes/Cart.php

displayShoppingCartCalled after the cart's table of items, right above the navigation buttons.
array(
'delivery' => $delivery,
'delivery_state' => State::getNameById($delivery->id_state),
'invoice' => $invoice,
'invoice_state' => State::getNameById($invoice->id_state),
'formattedAddresses' => $formatted_addresses,
'products' => array_values($products),
'gift_products' => $gift_products,
'discounts' => $cart_rules,
'is_virtual_cart' => (int)$this->isVirtualCart(),
'total_discounts' => $total_discounts,
'total_discounts_tax_exc' => $total_discounts_tax_exc,
'total_wrapping' => $this->getOrderTotal(true, Cart::ONLY_WRAPPING),
'total_wrapping_tax_exc' => $this->getOrderTotal(false, Cart::ONLY_WRAPPING),
'total_shipping' => $total_shipping,
'total_shipping_tax_exc' => $total_shipping_tax_exc,
'total_products_wt' => $total_products_wt,
'total_products' => $total_products,
'total_price' => $base_total_tax_inc,
'total_tax' => $total_tax,
'total_price_without_tax' => $base_total_tax_exc,
'is_multi_address_delivery' => $this->isMultiAddressDelivery() || ((int)Tools::getValue('multi-shipping') == 1),
'free_ship' => $total_shipping ? 0 : 1,
'carrier' => new Carrier($this->id_carrier, $id_lang),
);

Can be found in /classes/Cart.php

displayCustomerAccountFormTopCalled within the client account creation form, right above the "Your personal information" block.N/A
displayCustomerAccountFormCalled within the client account creation form, right before the "Register" button.N/A
actionCustomerAccountAddCalled right after the client account creation.N/A
displayCustomerAccountCalled on the client account homepage, after the list of available links. Ideal location to add a link to this list.N/A
displayMyAccountBlockCalled 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.N/A
displayMyAccountBlockfooterDisplays extra information inside the "My account" block.N/A
actionAuthenticationCalled right after the client identification, only if the authentication is valid (e-mail address and password are both OK).N/A
actionBeforeAuthenticationCalled right before authentication.N/A

Search page

Hook nameDescriptionWhat to expect in $params? (Pseudocode)
actionSearchCalled after a search is performed. Ideal location to parse and/or handle the search query and results.
array(
    'expr' => (string) Search query,
    'total' => (int) Amount of search results
);

Carrier choice page

Hook name

Description

What to expect in $params? (Pseudocode)
displayBeforeCarrierDisplayed before the carrier list on front-office.
array(
'carriers' => array(
array(
'name' => (string) Name,
'img' => (string) Image URL,
'delay' => (string) Delay text,
'price' =>  (float) Total price with tax,
'price_tax_exc' => (float) Total price without tax,
'id_carrier' => (int) intified option delivery identifier,
'id_module' => (int) Module ID
)),
'checked' => (int) intified selected carriers,
'delivery_option_list' => array(array(
0 => array( // First address
'12,' => array( // First delivery option available for this address
carrier_list => array(
12 => array( // First carrier for this option
'instance' => Carrier Object,
'logo' => <url to the carrier's logo>,
'price_with_tax' => 12.4, // Example
'price_without_tax' => 12.4, // Example
'package_list' => array(
1, // Example
3, // Example
),
),
),
is_best_grade => true, // Does this option have the biggest grade (quick shipping) for this shipping address
is_best_price => true, // Does this option have the lower price for this shipping address
unique_carrier => true, // Does this option use a unique carrier
total_price_with_tax => 12.5,
total_price_without_tax => 12.5,
position => 5, // Average of the carrier position
),
),
)),
'delivery_option' => array(
'<id_address>' => Delivery option,
...
)
); 
NOTE: intified means an array of integers 'intified' by Cart::intifier
displayCarrierListCalled after the list of available carriers, during the order process. Ideal location to add a carrier, as added by a module.
array(
    'address' => (object) Address object
);

Payment page

Hook nameDescriptionWhat to expect in $params? (Pseudocode)
displayPaymentTopTop of payment page.N/A
displayPaymentCalled 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.N/A
displayPaymentReturnCalled 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.
array(
    'total_to_pay' => (float) Total amount with tax,
    'currency' => (string) Currency sign,
    'objOrder' => (object) Order object,
    'currencyObj' => (object) Currency object
);
displayOrderConfirmationA duplicate of paymentReturn.
array(
    'total_to_pay' => (float) Total amount with tax,
    'currency' => (string) Currency sign,
    'objOrder' => (object) Order object,
    'currencyObj' => (object) Currency object
);
displayBeforePaymentCalled 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).
array(
    'module' => (string) Module link [e.g. /module/test/front]
);

Order page

Hook nameDescriptionWhat to expect in $params? (Pseudocode)
actionOrderReturnCalled when the customer request to send his merchandise back to the store, and if now error occurs.
array(
    'orderReturn' => (object) OrderReturn object
);
displayPDFInvoiceCalled when displaying the invoice in PDF format. Ideal location to display content within the invoice.N/A

Mobile theme hooks

All these hooks are specific to PrestaShop's default mobile theme.

The four first ones are in PrestaShop's internal hooks database, so the user can attach an action/interface to these hooks using the Modules > Positions page.
All the other ones exist in the mobile theme TPL files, but are not in the internal hooks database. A developer can still use them to attach content to specific portion of the code.

Hook nameDescription
displayMobileTopSiteMap 
displayMobileHeader 
displayMobileShoppingCartTop 
displayMobileAddToCartTop 
displayMobileShoppingCartTop 
displayMobileShoppingCartBottom 
displayMobileTopSiteMap 
displayMobileFooterChoice 
displayMobileShoppingCartTop 
displayMobileShoppingCartBottom 
displayMobileIndex 
mobileCustomerAccount 
displayMobileTop 
displayMobileAddToCartTop 
displayMobileShoppingCartTop 
displayMobileShoppingCartButton 
displayMobileShoppingCartBottom 
displayMobileShoppingCartTop 
displayMobileShoppingCartBottom 

Existing back-office hooks

General hooks

Hook nameDescriptionWhat to expect in $params? (Pseudocode)
displayBackOfficeTopCalled within the header, above the tabs.N/A
displayBackOfficeHeaderCalled between the HEAD tags. Ideal location for adding JavaScript and CSS files.N/A
displayBackOfficeFooterCalled within the page footer, above the "Power By PrestaShop" line.N/A
displayBackOfficeHomeCalled at the center of the homepage.N/A

Orders and order details

Hook nameDescriptionWhat to expect in $params? (Pseudocode)
actionValidateOrderCalled during the new order creation process, right after it has been created.
array(
    'cart' => (object) Cart object,
    'order' => (object) Order object,
    'customer' => (object) Customer object,
    'currency' => (object) Currency object,
    'orderStatus' => (object) OrderState object
);
actionPaymentConfirmationCalled when an order's status becomes "Payment accepted".
array(
    'id_order' => (int) Order ID
);
actionOrderStatusUpdateCalled when an order's status is changed, right before it is actually changed.
array(
    'newOrderStatus' => (object) OrderState object,
    'id_order' => (int) Order ID
);
actionOrderStatusPostUpdateCalled when an order's status is changed, right after it is actually changed.
array(
    'newOrderStatus' => (object) OrderState object,
'id_order' => (int) Order ID
);
actionProductCancelCalled when an item is deleted from an order, right after the deletion.
array(
'order' => (object) Order object,
'id_order_detail' => (int) Order Detail ID
); 
displayInvoiceCalled when the order's details are displayed, above the Client Information block.N/A
displayAdminOrderCalled when the order's details are displayed, below the Client Information block.
array(
'id_order' = (int) Order ID
); 
actionOrderSlipAddCalled during the creation of a credit note, right after it has been created.
array(
    'order' => Order oject,
    'productList' => array(
        (int) product ID 1,
(int) product ID 2,
...,
(int) product ID n ), 'qtyList' => array( (int) quantity 1,
(int) quantity 2,
...,
(int) quantity n 
    )
);

The order of IDs and quantities is important!

Products

Hook nameDescriptionWhat to expect in $params? (Pseudocode)
actionProductSaveCalled when saving products.
array(
'id_product' => (int) Product ID
); 
actionUpdateQuantityCalled 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.
array(
    'id_product' => (int) Product ID,
    'id_product_attribute' => (int) Product attribute ID,
    'quantity' => (int) New product quantity
);
actionProductAttributeUpdateCalled when a product declination is updated, right after said update.
array(
'id_product_attribute' => (int) Product attribute ID
);
actionProductAttributeDeleteCalled when a product declination is deleted.
array(
'product' => (object) Product object
);
actionWatermarkCalled when an image is added to a product, right after said addition.
array(
    'id_image' => (int) Image ID,
    'id_product' => (int) Product ID
);
displayAttributeFormAdd fields to the form "attribute value".N/A
displayAttributeGroupFormAdd fields to the form "attribute group".N/A
displayAttributeGroupPostProcessCalled when post-process in admin attribute group.N/A
displayFeatureFormAdd fields to the form "feature".N/A
displayFeaturePostProcessCalled when post-process in admin feature.N/A
displayFeatureValueFormAdd fields to the form "feature value".N/A
displayFeatureValuePostProcessCalled when post-process in admin feature value.N/A

Statistics

Hook nameDescriptionWhat to expect in $params? (Pseudocode)
displayAdminStatsGraphEngineCalled when a stats graph is displayed.N/A
displayAdminStatsGridEngineCalled when the grid of stats is displayed.N/A
displayAdminStatsModulesCalled when the list of stats modules is displayed.N/A

Clients

Hook nameDescriptionWhat to expect in $params? (Pseudocode)
displayAdminCustomersCalled when a client's details are displayed, right after the list of the clients groups the current client belongs to.N/A

Carriers

Hook nameDescriptionWhat to expect in $params? (Pseudocode)
actionCarrierUpdateCalled during a carrier's update, right after said update.
array(
    'id_carrier' => (int) Current Carrier ID,
    'carrier' => (object) New Carrier object
);