Book Image

PrestaShop Module Development

By : Fabien Serny
Book Image

PrestaShop Module Development

By: Fabien Serny

Overview of this book

Table of Contents (19 chapters)
PrestaShop Module Development
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Appendix A. Native Hooks

The following table displays 145 different hooks available in PrestaShop:

Hook name

Description

Parameters

Files

actionAdminControllerSetMedia

This hook is used to include a CSS or JS file in the back office header.

None

/classes/controller/AdminController.php

actionAdminMetaSave

The AdminMeta controller corresponds to the SEO & URLs tab in the back office. The hook is used to add actions to this tab after a configuration change.

None

/controllers/admin/AdminMetaController.php

actionAdminOrdersTrackingNumberUpdate

This hook is used to trigger actions after a tracking number is updated on an order in the back office (for example, send an e-mail with the tracking number to the customer).

  • order: This contains the order object concerned with the update.

/controllers/admin/AdminOrdersController.php

actionAttributeDelete

This hook is used to trigger actions after an attribute is deleted.

  • id_attribute: This contains the id_attribute integer corresponding to the deleted one.

/classes/Attribute.php

actionAttributeGroupDelete

This hook is used to trigger actions after an attribute group is deleted.

  • id_attribute_group: This contains the id_attribute_group integer corresponding to the deleted one.

/classes/AttributeGroup.php

actionAttributeGroupSave

This hook is used to trigger actions after an attribute group is saved.

  • id_attribute_group: This contains id_attribute_group, the integer corresponding to the saved one.

/classes/AttributeGroup.php

actionAttributeSave

This hook is used to trigger actions after an attribute is saved.

  • id_attribute: This contains the id_attribute integer corresponding to the saved one.

/classes/Attribute.php

actionAuthentication

This hook is used to trigger actions after a customer has logged in.

None

/controllers/front/AuthController.php

actionBeforeAuthentication

This hook is used to trigger actions before a customer has logged in.

None

/controllers/front/AuthController.php

actionBeforeSubmitAccount

This hook is used to trigger actions before a customer registers for an account.

Nota Bene: The hook used after a customer registers for an account is not prefixed the same way as actionCustomerAccountAdd.

None

/controllers/front/AuthController.php

actionCarrierProcess

This hook is used to trigger actions after a customer chooses a carrier for his/her order.

  • cart: This contains the cart object of the customer.

/controllers/front/ParentOrderController.php

actionCarrierUpdate

This hook is used to trigger actions after a carrier is updated in the back office.

Nota Bene: In PrestaShop, when an employee updates a carrier, a new carrier is created to keep the history of modifications. In the parameters of this hook, id_carrier corresponds to the old carrier and carrier corresponds to the new carrier.

  • id_carrier: This contains the id_carrier integer corresponding to the to the carrier that the merchant tries to update.

  • carrier: This contains the new carrier object.

/controllers/admin/AdminCarriersController.php

actionCartListOverride

This hook is used to trigger actions.

  • summary: This contains an array with the content of the json cart answered on cart summary's Ajax request.

/controllers/front/CartController.php

actionCartSave

This hook is used to trigger actions when a cart is updated (product added, carrier chosen, and so on).

None

/classes/Cart.php

actionCategoryAdd

This hook is used to trigger actions after a category is created.

  • category: This contains the concerned category object.

/classes/Category.php

actionCategoryDelete

This hook is used to trigger actions after a category is deleted.

  • category: This contains the concerned category object.

/classes/Category.php

actionCategoryUpdate

This hook is used to trigger actions after a category is updated.

Nota Bene: Depending on the case, the category parameter is not always set.

  • category: This contains the concerned category object.

/classes/Category.php

/controllers/admin/AdminCategoriesController.php

/controllers/admin/AdminProductsController.php

actionCustomerAccountAdd

This hook is used to trigger actions after a customer registers for an account.

  • _POST: This contains the $_POST array values.

  • newCustomer: This contains the customer object created.

/controllers/front/AuthController.php

actionDispatcher

This hook is used to trigger actions after the dispatcher instantiates the controller corresponding to the current route and just before running it.

  • controller_type: This is set to 1, 2, or 3 corresponding to the front controller, admin, or module.

  • controller_class: This contains the controller class's string name.

  • is_module: This is set to 1 or 0 depending on whether it is a module or not.

/classes/Dispatcher.php

actionFeatureDelete

This hook is used to trigger actions after a feature is deleted.

  • id_feature: This contains the id_feature integer corresponding to the deleted one.

/classes/Feature.php

actionFeatureSave

This hook is used to trigger actions after a feature is saved.

  • id_feature: This contains the id_feature integer corresponding to the saved one.

/classes/Feature.php

actionFeatureValueDelete

This hook is used to trigger actions after a feature value is deleted.

  • id_feature_value: This contains the integer identifier corresponding to the deleted one.

/classes/FeatureValue.php

actionFeatureValueSave

This hook is used to trigger actions after a feature value is saved.

  • id_feature_value: This contains the identifier integer corresponding to the saved one.

/classes/FeatureValue.php

actionFrontControllerSetMedia

This hook is used to include a CSS or JS file in the front office's header.

None

/classes/controller/FrontController.php

actionHtaccessCreate

This hook is used to add lines in the .htacces s file (or trigger actions) after its creation or updation.

None

/classes/Tools.php

actionModuleInstallAfter

This hook is used to trigger actions after a module's installation.

  • object: This contains the Module object installed.

/classes/module/Module.php

actionModuleInstallBefore

This hook is used to trigger actions before a module's installation.

  • object: This contains the Module object installed.

/classes/module/Module.php

actionModuleRegisterHookAfter

This hook is called just after the registration of a module on a hook.

  • object: This contains the Module object.

  • hook_name: This is the string containing the hook name to which the module has been attached.

/classes/module/Module.php

actionModuleRegisterHookBefore

This hook is called just before the registration of a module on a hook.

  • object: This contains the Module object.

  • hook_name: This is the string containing the hook name to which the module has been attached.

/classes/module/Module.php

actionModuleUnRegisterHookAfter

This hook is called just after the unregistration of a module from a hook.

  • object: This contains the Module object.

  • hook_name: This is the string containing the hook name to which the module has been attached.

/classes/module/Module.php

actionModuleUnRegisterHookBefore

This hook is called just before the unregistration of a module from a hook.

  • object: This contains the Module object.

  • hook_name: This is the string containing the hook name to which the module has been attached.

/classes/module/Module.php

actionObjectAddAfter

This hook is used to trigger actions at the end of the add method of an ObjectModel class.

  • object: This contains the concerned object.

/classes/ObjectModel.php

actionObjectAddBefore

This hook is used to trigger actions at the beginning of the add method of an ObjectModel class.

  • object: This contains the concerned object.

/classes/ObjectModel.php

actionObjectAttributeAddBefore

This hook is used to trigger actions before an attribute is created.

None

/controllers/admin/AdminAttributesGroupsController.php

actionObjectAttributeGroupAddBefore

This hook is used to trigger actions before a group attribute is created.

None

/controllers/admin/AdminAttributesGroupsController.php

actionObjectDeleteAfter

This hook is used to trigger actions at the end of the delete method of an ObjectModel class.

  • object: This contains the concerned object.

/classes/ObjectModel.php

actionObjectDeleteBefore

This hook is used to trigger actions at the beginning of the delete method of an ObjectModel class.

  • object: This contains the concerned object.

/classes/ObjectModel.php

actionObjectUpdateAfter

This hook is used to trigger actions at the end of the update method of an ObjectModel class.

  • object: This contains the concerned object.

/classes/ObjectModel.php

actionObjectUpdateBefore

This hook is used to trigger actions at the beginning of the update method of an ObjectModel class.

  • object: This contains the concerned object.

/classes/ObjectModel.php

actionOrderDetail

This hook is used to trigger actions when order details are requested.

  • carrier: This contains the carrier object associated with the order.

  • order: This contains the concerned order object.

/controllers/front/GuestTrackingController.php

/controllers/front/OrderDetailController.php

actionOrderHistoryAddAfter

This hook is used to trigger actions when an order status is stored in history. This hook is called after actionOrderStatusUpdate and actionOrderStatusPostUpdate.

  • object: This contains the concerned OrderHistory object.

None

actionOrderReturn

This hook is used to trigger actions when an order status is stored in history. This hook is called after actionOrderStatusUpdate and actionOrderStatusPostUpdate.

  • orderReturn: This contains the concerned OrderReturn object.

None

actionOrderSlipAdd

This hook is used to trigger actions when an order slip is created.

  • order: This contains the concerned Order object.

  • productList: This contains the concerned array of products.

  • qtyList: This contains the concerned array of the quantity of products.

/controllers/admin/AdminOrdersController.php

actionOrderStatusPostUpdate

This hook is used to trigger actions after an order status is changed.

  • newOrderStatus: This contains the new OrderState object.

  • id_order: This contains the id_order integer corresponding to the order.

/classes/order/OrderHistory.php

actionOrderStatusUpdate

This hook is used to trigger actions before an order status is changed.

  • newOrderStatus: This contains the new OrderState object.

  • id_order: This contains the id_order integer corresponding to the order.

/classes/order/OrderHistory.php

actionPasswordRenew

This hook is used to trigger actions after a customer requests for a new password.

  • customer: This contains the Customer object.

  • password: This contains the new password string.

/controllers/front/PasswordController.php

actionPaymentCCAdd

This hook is used to trigger actions after a payment is made.

  • paymentCC: This contains the OrderPayment object.

/classes/order/OrderPayment.php

actionPaymentConfirmation

This hook is used to trigger actions when an order changes its status to a paid status. This hook is called just before actionOrderStatusUpdate.

  • id_order: This contains the id_order integer corresponding to the order.

/classes/order/OrderHistory.php

actionPDFInvoiceRender

This hook is used to trigger actions when a PDF invoice is rendered.

  • order_invoice_list: This contains an array of the OrderInvoice object.

/controllers/admin/AdminPdfController.php

/controllers/front/PdfInvoiceController.php

actionProductAdd

This hook is used to trigger actions when a product is created.

  • product: This contains the Product object.

/controllers/admin/AdminProductsController.php

actionProductAttributeDelete

This hook is used to trigger actions when all the product attributes are deleted.

  • id_product_attribute: This contains the concerned id_product_attribute integer.

  • id_product: This contains the id_product integer of the concerned product.

  • deleteAllAttributes: This contains the value true.

/classes/Product.php

actionProductAttributeUpdate

This hook is used to trigger actions when a product attribute is updated.

  • id_product_attribute: This contains the concerned id_product_attribute integer .

/classes/Product.php

actionProductCancel

This hook is used to trigger actions when a product is cancelled from an order.

  • order: This contains the concerned Order object.

  • id_order_detail: This contains the id_order_detail integer corresponding to the line of the product.

/controllers/admin/AdminOrdersController.php

actionProductCoverage

This hook is used to trigger actions when a product quantity is removed from a warehouse.

  • id_product: This contains the id_product integer concerned.

  • id_product_attribute: This contains the concerned id_product_attribute integer.

  • warehouse: This contains the concerned Warehouse object.

/classes/stock/StockManager.php

actionProductDelete

This hook is used to trigger actions when a product is deleted.

  • product: This contains the Product object.

/classes/Product.php

actionProductListOverride

This hook is used to load a different products list. At present, it is mainly used by the layered navigation module. Parameters are passed in reference and can be filled in by all modules attached to this hook.

  • nbProducts: This contains the integer of the current number of products.

  • catProducts: This contains the array of current products.

  • hookExecuted: This contains a flag.

/controllers/front/CategoryController.php

actionProductOutOfStock

This hook is used to trigger actions when a product is out of stock.

  • product: This contains the Product object.

/controllers/front/ProductController.php

actionProductSave

This hook is used to trigger actions when a product is created or updated.

  • id_product: This contains the concerned id_product integer.

/classes/Product.php

actionProductUpdate

This hook is used to trigger actions when a product's quantity is updated.

  • id_product: This contains the concerned id_product integer.

  • id_product_attribute: This contains the concerned id_product_attribute integer.

  • quantity: This contains the integer quantity update.

/classes/stock/StockAvailable.php

actionSearch

This hook is used to trigger actions when a product search is performed.

  • expr: This contains the string query.

  • total: This contains the integer of the total number of results.

/controllers/front/SearchController.php

actionShopDataDuplication

This hook is used to trigger actions when data is duplicated from one shop to another (when the multistore option is enabled).

  • old_id_shop: This contains the id_shop integer of the old shop.

  • new_id_shop: This contains the id_shop integer of the new shop.

/classes/shop/Shop.php

actionTaxManager

This hook permits us to create a dynamic tax system.

  • This contains the Address object of the customer.

/classes/tax/TaxManagerFactory.php

actionUpdateQuantity

This hook is used to trigger actions after a product is updated. This hook is called after actionProductSave.

  • id_product: This contains the Product object.

/classes/stock/StockAvailable.php

actionValidateOrder

This hook is used to trigger actions when an order is created.

  • cart: This contains the Cart object used for the order.

  • customer: This contains the Customer object corresponding to the cart.

  • currency: This contains the Currency object used for the order.

  • orderStatus: This contains the OrderState object to which the order is set when created.

/classes/PaymentModule.php

actionWatermark

This hook is used to trigger actions when a picture is uploaded (generally used to tag pictures with a watermark).

  • id_image: This contains the id_image integer.

  • id_product: This contains the id_product integer.

/classes/FileUploader.php

/controllers/admin/AdminImportController.php

/controllers/admin/AdminProductsController.php

dashboardData

This hook is used to refresh widgets on the dashboard.

  • date_from, date_to, compare_from, and compare_to: They contain dates in string format.

/controllers/admin/AdminDashboardController.php

dashboardZoneOne

This hook is used to display widgets in the first zone of the dashboard.

  • date_from and date_to: They contain the date specified by the employee.

/controllers/admin/AdminDashboardController.php

dashboardZoneTwo

This hook is used to display widgets in the second zone of the dashboard.

  • date_from and date_to: They contain the date specified by the employee.

/controllers/admin/AdminDashboardController.php

deleteProductAttribute

This hook is used to trigger actions when a product attribute is deleted.

  • id_product_attribute: This contains the concerned id_product_attribute integer.

  • id_product: This contains the id_product integer of the product concerned.

  • deleteAllAttributes: This contains the value false.

/classes/Product.php

displayAdminCustomers

This hook is used to display elements on the customer's view in the back office.

  • id_customer: This contains the concerned id_customer integer.

/admin/themes/default/template/controllers/customers/helpers/view/view.tpl

displayAdminForm

This hook is used to display elements on all forms in the back office.

None

/admin/themes/default/template/helpers/form/form.tpl

displayAdminHomeInfos

This hook is used to display elements on the back office dashboard.

None

/admin/themes/default/template/controllers/home/content.tpl

displayAdminHomeQuickLinks

This hook is used to add quick links on the back office dashboard.

None

/admin/themes/default/template/controllers/home/content.tpl

displayAdminHomeStatistics

This hook is used to add statistics on the back office dashboard.

None

/admin/themes/default/template/controllers/home/content.tpl

displayAdminListAfter

This hook is used to display elements at the bottom of all the back office lists.

None

/admin/themes/default/template/helpers/list/list_footer.tpl

displayAdminListBefore

This hook is used to display elements on top of all the back office lists.

None

/admin/themes/default/template/helpers/list/list_header.tpl

/admin/themes/default/template/controllers/tax_rules/helpers/list/list_header.tpl

displayAdminOptions

This hook is used to display elements at the bottom of all the back office configuration forms.

None

/admin/themes/default/template/helpers/options/options.tpl

displayAdminOrder

This hook is used to display elements at the bottom of an order's view.

None

/admin/themes/default/template/controllers/orders/helpers/view/view.tpl

displayAdminOrderContentOrder

This hook launches the modules when the AdminOrder tab is displayed in the back office and extends/overrides the order panel's content.

  • order: This contains the order object.

  • products: This is an array that contains all the products of the order.

  • customer: This contains the customer object associated with the order.

/controllers/admin/AdminOrdersController.php

displayAdminOrderContentShip

This hook launches the modules when the AdminOrder tab is displayed in the back office and extends/overrides the shipping panel's content.

  • order: This contains the order object.

  • products: This is an array that contains all the products of the order.

  • customer: This contains the customer object associated with the order.

/controllers/admin/AdminOrdersController.php

displayAdminOrderTabOrder

This hook launches the modules when the AdminOrder tab is displayed in the back office and extends/overrides the order panel's tabs.

  • order: It contains the order object.

  • products: It is an array that contains all the products of the order.

  • customer: It contains the customer object associated with the order.

/controllers/admin/AdminOrdersController.php

displayAdminOrderTabShip

This hook launches the modules when the AdminOrder tab is displayed in the back office and extends/overrides the shipping panel's tabs.

  • order: This contains the order object.

  • products: This is an array that contains all the products of the order.

  • customer: This contains the customer object associated with the order.

/controllers/admin/AdminOrdersController.php

displayAdminProductsExtra

This hook is used to display elements on the product admin page.

None

/controllers/admin/AdminProductsController.php

displayAdminStatsModules

This hook is used to display elements in the statistics admin tab.

None

/controllers/admin/AdminStatsTabController.php

displayAdminView

This hook is used to display elements at the bottom of all the viewed pages.

None

/admin/themes/default/template/helpers/view/view.tpl

displayAttributeForm

This hook is used to display elements at the bottom of the back office product attribute form.

None

/admin/themes/default/template/controllers/attributes/helpers/form/form.tpl

displayAttributeGroupForm

This hook is used to display elements at the bottom of the back office product attribute group form.

None

/admin/themes/default/template/controllers/attributes_groups/helpers/form/form.tpl

displayBackOfficeCategory

This hook launches the modules when the AdminCategories tab is displayed in the back office.

None

/controllers/admin/AdminCategoriesController.php

displayBackOfficeFooter

This hook is used to display elements on the back office footer.

None

/admin/footer.inc.php (deprecated)

/admin/themes/default/template/footer.tpl

displayBackOfficeHeader

This hook is used to display elements on the back office HTML header.

None

/admin/header.inc.php (deprecated)

/classes/controller/AdminController.php

displayBackOfficeHome

This hook is used to display elements on the back office dashboard. This hook is deprecated.

None

/admin/themes/default/template/controllers/home/content.tpl

displayBackOfficeTop

This hook is used to display elements on top of the back office.

None

/admin/header.inc.php (deprecated)

/classes/controller/AdminController.php

displayBanner

This hook is used to display a banner in the header of your theme.

None

/themes/default-bootstrap/header.tpl

displayBeforeCarrier

This hook is used to display elements before the carriers list.

  • carriers: This contains the array of available carriers.

  • checked: This contains the integer of the selected delivery option.

  • delivery_option_list: This contains the array of delivery options.

  • delivery_option: This contains the string of the selected delivery option.

/controllers/front/OrderOpcController.php

/controllers/front/ParentOrderController.php

displayBeforePayment

This hook is used to display elements before the payment is done.

  • module: This always contains the order.php?step=3 string.

/controllers/front/OrderController.php

displayCarrierList

This hook is used to display elements after the carriers list (such as delivery point selection).

  • address: This always contains the Address object filled in by the customer.

/classes/Cart.php

/controllers/front/OrderController.php

displayCompareExtraInformation

This hook is used to display extra information on the product comparison page.

  • list_ids_product: This is an array that contains a list of the products IDs.

/controllers/front/CompareController.php

displayCustomerAccount

This hook is used to display elements on the customer account page.

None

/controllers/front/MyAccountController.php

displayCustomerAccountForm

This hook is used to display elements at the bottom of the customer subscription form.

None

/controllers/front/AuthController.php

/controllers/front/OrderOpcController.php

displayCustomerAccountFormTop

This hook is used to display elements at the top of the customer subscription form.

None

/controllers/front/AuthController.php

/controllers/front/OrderOpcController.php

displayFeatureForm

This hook is used to display elements on the back office feature form.

  • id_feature: This contains the id_feature integer concerned.

/admin/themes/default/template/controllers/features/helpers/form/form.tpl

displayFeaturePostProcess

This hook is used to trigger actions on the postprocess feature. This hook should actually be prefixed with action, not display.

Nota Bene: Errors are sent as reference to allow displayFeaturePostProcess to stop saving a process, if necessary.

  • errors: This contains the array of errors in reference.

/controllers/admin/AdminFeaturesController.php

displayFeatureValueForm

This hook is used to display elements on the back office feature value form.

  • id_feature_value: This contains the concerned id_feature_value integer.

/admin/themes/default/template/controllers/feature_value/helpers/form/form.tpl

displayFeatureValuePostProcess

This hook is used to trigger actions on the postprocess feature value. This hook should actually be prefixed with action, not display.

Nota Bene: Errors are sent as reference to allow displayFeatureValuePostProcess to stop saving a process, if necessary.

  • errors: This contains the array of errors in reference.

/controllers/admin/AdminFeaturesController.php

displayFooter

This hook is used to display elements at the footer of the front office.

None

/classes/controller/FrontController.php

displayFooterProduct

This hook is used to display elements in the footer of the product page.

  • product: This contains the Product object displayed.

  • category: This contains the default Category object associated with the product.

/controllers/front/ProductController.php

displayHeader

This hook is used to display elements in the HTML header of the front office.

None

/classes/controller/FrontController.php

displayHome

This hook is used to display elements on the home page of the front office.

None

/controllers/front/IndexController.php

displayHomeTab

This hook displays new elements on the home page tab.

None

/controllers/front/IndexController.php

displayHomeTabContent

This hook displays new elements on the home page tab's content.

None

/controllers/front/IndexController.php

displayInvoice

This hook is used to display elements on an order view in the customer's account.

  • id_order: This contains the id_order integer of the order associated with the invoice.

/admin/themes/default/template/controllers/orders/helpers/view/view.tpl

displayLeftColumn

This hook is used to display elements in the left-hand side column of the front office.

None

/classes/controller/FrontController.php

displayLeftColumnProduct

This hook is used to display elements in the left-hand side column of the product page.

None

/controllers/front/ProductController.php

displayMaintenance

This hook displays new elements on the maintenance page.

None

/classes/controller/FrontController.php

displayMobileAddToCartTop

This hook is used to display elements in the product page of the mobile theme, above the Add to cart button.

None

/themes/default/mobile/product.tpl

displayMobileFooterChoice

This hook is used to display elements in the footer of the mobile theme.

None

/themes/default/mobile/footer.tpl

displayMobileHeader

This hook is used to display elements in the HTML header of the mobile theme.

None

/classes/controller/FrontController.php

DisplayMobileIndex

This hook is used to display elements on the home page of the mobile theme.

None

/themes/default/mobile/index.tpl

displayMobileShoppingCartBottom

This hook is used to display elements at the bottom of the shopping cart on the mobile theme.

None

/themes/default/mobile/order-address.tpl

/themes/default/mobile/order-carrier.tpl

/themes/default/mobile/order-payment.tpl

/themes/default/mobile/shopping-cart.tpl

displayMobileShoppingCartButton

This hook is used to add a button on the shopping cart of the mobile theme.

None

/themes/default/mobile/shopping-cart.tpl

displayMobileShoppingCartTop

This hook is used to display elements at the top of the shopping cart on the mobile theme.

None

/themes/default/mobile/order-address.tpl

/themes/default/mobile/order-carrier.tpl

/themes/default/mobile/order-payment.tpl

/themes/default/mobile/shopping-cart.tpl

displayMobileTop

This hook is used to display elements on top of the mobile theme.

None

/themes/default/mobile/header.tpl

displayMobileTopSiteMap

This hook is used to display elements on top of the site map of the mobile theme.

None

/themes/default/mobile/sitemap.tpl

displayMyAccountBlock

This hook is used to display extra elements in the My account block.

None

/modules/blockmyaccount/blockmyaccount.php

/modules/blockmyaccountfooter/blockmyaccountfooter.php

displayNav

This hook is used to display the top navigation in the header of your theme.

None

/themes/default-bootstrap/header.tpl

displayOrderConfirmation

This hook is used to display elements on the order confirmation page.

  • total_to_pay: This contains the float amount to be paid.

  • currency: This contains the currency sign string.

  • objOrder: This contains the concerned Order object.

  • currencyObj: This contains the Currency object used for the order.

/controllers/front/OrderConfirmationController.php

displayOrderDetail

This hook is used to display elements on the order details page.

  • order: This contains the concerned Order object.

/controllers/front/GuestTrackingController.php

/controllers/front/OrderDetailController.php

DisplayOverrideTemplate

This hook is used to dynamically change the template for a controller.

  • controller: This contains the Controller object.

/classes/controller/FrontController.php

displayPayment

This hook is used to display available payment methods.

None

/classes/module/Module.php

/controllers/front/OrderOpcController.php

/controllers/front/ParentOrderController.php

displayPaymentReturn

This hook is used to display elements on the order confirmation page.

  • total_to_pay: This contains the float amount to pay.

  • currency: This contains the currency sign string.

  • objOrder: This contains the concerned Order object.

  • currencyObj: This contains the Currency object used for the order.

/controllers/front/OrderConfirmationController.php

displayPaymentTop

This hook is used to display elements on top of the available payment methods.

None

/controllers/front/OrderOpcController.php

/controllers/front/ParentOrderController.php

displayProductButtons

This hook is used to add features on the product page.

  • product: This contains the Product object.

/controllers/front/ProductController.php

displayProductComparison

This hook is used to display elements on the product comparison page.

  • list_ids_product: This contains the array of id_product.

/controllers/front/CompareController.php

displayProductListFunctionalButtons

This hook launches modules when the products list is displayed in the front office.

  • product: This contains the Product object.

/themes/default-bootstrap/product-list.tpl

displayProductListReviews

This hook is used to display reviews on the product in the product list page.

  • product: This is an array that contains the product's information.

/themes/default-bootstrap/product-list.tpl

displayProductTab

This hook is used to add a tab on the product page. This only permits you to add the button of the tab. To add the content, you will have to use the displayProductTabContent hook.

  • product: This contains the Product object.

/controllers/front/ProductController.php

displayProductTabContent

This hook is used to add a tab's content on the product page. This only permits us to add the content of the tab. To add the button, you will have to use the displayProductTab hook.

  • product: This contains the Product object.

/controllers/front/ProductController.php

displayRightColumn

This hook is used to display elements in the right-hand side column of the front office.

  • cart: This contains the Cart object of the customer.

/classes/controller/FrontController.php

displayRightColumnProduct

This hook is used to display elements in the right-hand side column of the product page.

None

/controllers/front/ProductController.php

displayShoppingCart

This hook is used to display elements on top of the shopping cart page.

  • summary: This contains an array of the order summary.

/controllers/front/CartController.php

/controllers/front/ParentOrderController.php

displayShoppingCartFooter

This hook is used to display elements on the bottom of the shopping cart page.

  • summary: It contains an array of the order summary.

/controllers/front/CartController.php

/controllers/front/ParentOrderController.php

displayTop

This hook is used to display elements at the top of the front office pages.

None

/classes/controller/FrontController.php

displayTopColumn

This hook displays new elements on top of the columns.

None

/themes/default-bootstrap/header.tpl

mobileCustomerAccount

This hook is used to display elements on the customer account page of the mobile theme.

None

/themes/default/mobile/my-account.tpl

moduleRoutes

This hook is used to add routes to the dispatcher. It is generally used when you have a controller in a module and you want a specific route for it.

None

/classes/Dispatcher.php

Note

Nota Bene

Some of these hooks, for example, actionAdminMetaSave, actionAttributeDelete, and so on, are not really useful anymore since the dynamic hooks are placed on the main actions in abstract classes.