Properties

$name

$name : string

Type

string — Hook name identifier

$title

$title : string

Type

string — Hook title (displayed in BO)

$description

$description : string

Type

string — Hook description

$position

$position : boolean

Type

boolean

$live_edit

$live_edit : boolean

Type

boolean — Is this hook usable with live edit ?

$executed_hooks

$executed_hooks : array

Type

array — List of executed hooks on this page

$native_module

$native_module : 

Type

$definition

$definition : 

Type

$_hook_modules_cache

$_hook_modules_cache : 

Type

$_hook_modules_cache_exec

$_hook_modules_cache_exec : 

Type

Methods

add()

add(  $autodate = true,   $null_values = false) 

Parameters

$autodate
$null_values

getHooks()

getHooks(boolean  $position = false) : array

Return Hooks List

Parameters

boolean $position

Returns

array —

Hooks List

getIdByName()

getIdByName(string  $hook_name) : integer

Return hook ID from name

Parameters

string $hook_name

Hook name

Returns

integer —

Hook ID

getNameById()

getNameById(  $hook_id) 

Return hook ID from name

Parameters

$hook_id

getLiveEditById()

getLiveEditById(  $hook_id) 

Return hook live edit bool from ID

Parameters

$hook_id

getHookAliasList()

getHookAliasList() : array

Get list of hook alias

Returns

array

getRetroHookName()

getRetroHookName(string  $hook_name) : integer

Return retrocompatible hook name

Parameters

string $hook_name

Hook name

Returns

integer —

Hook ID

getHookModuleList()

getHookModuleList() : array

Get list of all registered hooks with modules

Returns

array

getModulesFromHook()

getModulesFromHook(integer  $id_hook, integer  $id_module = null) : array

Return Hooks List

Parameters

integer $id_hook
integer $id_module

Returns

array —

Modules List

getHookModuleExecList()

getHookModuleExecList(string  $hook_name = null) : array

Get list of modules we can execute per hook

Parameters

string $hook_name

Get list of modules for this hook if given

Returns

array

exec()

exec(string  $hook_name, array  $hook_args = array(), integer  $id_module = null,   $array_return = false,   $check_exceptions = true,   $use_push = false,   $id_shop = null) : string

Execute modules for specified hook

Parameters

string $hook_name

Hook Name

array $hook_args

Parameters for the functions

integer $id_module

Execute hook for this module only

$array_return
$check_exceptions
$use_push
$id_shop

Returns

string —

modules output

wrapLiveEdit()

wrapLiveEdit(  $display,   $moduleInstance,   $id_hook) 

Parameters

$display
$moduleInstance
$id_hook

updateOrderStatus()

updateOrderStatus(  $newOrderStatusId,   $id_order) 

Parameters

$newOrderStatusId
$id_order

postUpdateOrderStatus()

postUpdateOrderStatus(  $newOrderStatusId,   $id_order) 

Parameters

$newOrderStatusId
$id_order

orderConfirmation()

orderConfirmation(  $id_order) 

Parameters

$id_order

paymentReturn()

paymentReturn(  $id_order,   $id_module) 

Parameters

$id_order
$id_module

PDFInvoice()

PDFInvoice(  $pdf,   $id_order) 

Parameters

$pdf
$id_order

backBeforePayment()

backBeforePayment(  $module) 

Parameters

$module

updateCarrier()

updateCarrier(  $id_carrier,   $carrier) 

Parameters

$id_carrier
$carrier

preloadHookModulesCache()

preloadHookModulesCache() : boolean

Preload hook modules cache

Returns

boolean —

preload_needed

get()

get(string  $hookName) : integer

Return hook ID from name

Parameters

string $hookName

Hook name

Returns

integer —

Hook ID

newOrder()

newOrder(  $cart,   $order,   $customer,   $currency,   $orderStatus) 

Called when quantity of a product is updated.

Parameters

$cart
$order
$customer
$currency
$orderStatus

updateQuantity()

updateQuantity(  $product,   $order = null) 

Parameters

$product
$order

productFooter()

productFooter(  $product,   $category) 

Parameters

$product
$category

productOutOfStock()

productOutOfStock(  $product) 

Parameters

$product

addProduct()

addProduct(  $product) 

Parameters

$product

updateProduct()

updateProduct(  $product) 

Parameters

$product

deleteProduct()

deleteProduct(  $product) 

Parameters

$product

updateProductAttribute()

updateProductAttribute(  $id_product_attribute) 

Parameters

$id_product_attribute