[-] MO : Fix hook name on differents modules - #PSCFV-2784
This commit is contained in:
@@ -33,7 +33,7 @@ function module_reinstall_blockmyaccount()
|
||||
{
|
||||
$res &= Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'hook`
|
||||
(`name`, `title`, `description`, `position`) VALUES
|
||||
("myAccountBlock", "My account block", "Display extra informations inside the \"my account\" block", 1)');
|
||||
("displayMyAccountBlock", "My account block", "Display extra informations inside the \"my account\" block", 1)');
|
||||
// register left column, and header, and addmyaccountblockhook
|
||||
$hooks = array('leftColumn', 'header');
|
||||
foreach($hooks as $hook_name)
|
||||
|
||||
@@ -33,7 +33,7 @@ function module_reinstall_blocksearch()
|
||||
{
|
||||
$res &= Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'hook`
|
||||
(`name`, `title`, `description`, `position`) VALUES
|
||||
("myAccountBlock", "My account block", "Display extra informations inside the \"my account\" block", 1)');
|
||||
("displayMyAccountBlock", "My account block", "Display extra informations inside the \"my account\" block", 1)');
|
||||
// register left column, and header, and addmyaccountblockhook
|
||||
$hooks = array('top', 'header');
|
||||
foreach($hooks as $hook_name)
|
||||
|
||||
@@ -84,12 +84,12 @@ class BlockMyAccount extends Module
|
||||
|
||||
private function addMyAccountBlockHook()
|
||||
{
|
||||
return Db::getInstance()->execute('INSERT IGNORE INTO `'._DB_PREFIX_.'hook` (`name`, `title`, `description`, `position`) VALUES (\'myAccountBlock\', \'My account block\', \'Display extra informations inside the "my account" block\', 1)');
|
||||
return Db::getInstance()->execute('INSERT IGNORE INTO `'._DB_PREFIX_.'hook` (`name`, `title`, `description`, `position`) VALUES (\'displayMyAccountBlock\', \'My account block\', \'Display extra informations inside the "my account" block\', 1)');
|
||||
}
|
||||
|
||||
private function removeMyAccountBlockHook()
|
||||
{
|
||||
return Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'hook` WHERE `name` = \'myAccountBlock\'');
|
||||
return Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'hook` WHERE `name` = \'displayMyAccountBlock\'');
|
||||
}
|
||||
|
||||
public function hookDisplayHeader($params)
|
||||
|
||||
@@ -65,7 +65,7 @@ class Blockmyaccountfooter extends Module
|
||||
$smarty->assign(array(
|
||||
'voucherAllowed' => (int)(Configuration::get('PS_VOUCHERS')),
|
||||
'returnAllowed' => (int)(Configuration::get('PS_ORDER_RETURN')),
|
||||
'HOOK_BLOCK_MY_ACCOUNT' => Hook::exec('myAccountBlock')
|
||||
'HOOK_BLOCK_MY_ACCOUNT' => Hook::exec('displayMyAccountBlock')
|
||||
));
|
||||
return $this->display(__FILE__, $this->name.'.tpl');
|
||||
}
|
||||
@@ -77,12 +77,12 @@ class Blockmyaccountfooter extends Module
|
||||
|
||||
private function addMyAccountBlockHook()
|
||||
{
|
||||
return Db::getInstance()->execute('INSERT IGNORE INTO `'._DB_PREFIX_.'hook` (`name`, `title`, `description`, `position`) VALUES (\'myAccountBlockfooter\', \'My account block\', \'Display extra informations inside the "my account" block\', 1)');
|
||||
return Db::getInstance()->execute('INSERT IGNORE INTO `'._DB_PREFIX_.'hook` (`name`, `title`, `description`, `position`) VALUES (\'displayMyAccountBlockfooter\', \'My account block\', \'Display extra informations inside the "my account" block\', 1)');
|
||||
}
|
||||
|
||||
private function removeMyAccountBlockHook()
|
||||
{
|
||||
return Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'hook` WHERE `name` = \'myAccountBlockfooter\'');
|
||||
return Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'hook` WHERE `name` = \'displayMyAccountBlockfooter\'');
|
||||
}
|
||||
|
||||
public function hookHeader($params)
|
||||
@@ -97,7 +97,7 @@ class Blockmyaccountfooter extends Module
|
||||
$smarty->assign(array(
|
||||
'voucherAllowed' => (int)(Configuration::get('PS_VOUCHERS')),
|
||||
'returnAllowed' => (int)(Configuration::get('PS_ORDER_RETURN')),
|
||||
'HOOK_BLOCK_MY_ACCOUNT' => Hook::exec('myAccountBlock')
|
||||
'HOOK_BLOCK_MY_ACCOUNT' => Hook::exec('displayMyAccountBlock')
|
||||
));
|
||||
return $this->display(__FILE__, $this->name.'.tpl');
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ class BlockWishList extends Module
|
||||
)
|
||||
return false;
|
||||
/* This hook is optional */
|
||||
$this->registerHook('myAccountBlock');
|
||||
$this->registerHook('displayMyAccountBlock');
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -225,7 +225,7 @@ class BlockWishList extends Module
|
||||
return $this->display(__FILE__, 'my-account.tpl');
|
||||
}
|
||||
|
||||
public function hookMyAccountBlock($params)
|
||||
public function hookDisplayMyAccountBlock($params)
|
||||
{
|
||||
return $this->hookCustomerAccount($params);
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ class Loyalty extends Module
|
||||
Configuration::updateValue('PS_LOYALTY_VOUCHER_CATEGORY', $category_config);
|
||||
|
||||
/* This hook is optional */
|
||||
$this->registerHook('myAccountBlock');
|
||||
$this->registerHook('displayMyAccountBlock');
|
||||
if (!LoyaltyStateModule::insertDefaultData())
|
||||
return false;
|
||||
return true;
|
||||
@@ -475,7 +475,7 @@ class Loyalty extends Module
|
||||
return $this->display(__FILE__, 'my-account.tpl');
|
||||
}
|
||||
|
||||
public function hookMyAccountBlock($params)
|
||||
public function hookDisplayMyAccountBlock($params)
|
||||
{
|
||||
return $this->hookCustomerAccount($params);
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ class ReferralProgram extends Module
|
||||
Configuration::updateValue('REFERRAL_PERCENTAGE', 5);
|
||||
|
||||
/* This hook is optional */
|
||||
$this->registerHook('myAccountBlock');
|
||||
$this->registerHook('displayMyAccountBlock');
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -387,7 +387,7 @@ class ReferralProgram extends Module
|
||||
return $this->display(__FILE__, 'my-account.tpl');
|
||||
}
|
||||
|
||||
public function hookMyAccountBlock($params)
|
||||
public function hookDisplayMyAccountBlock($params)
|
||||
{
|
||||
return $this->hookCustomerAccount($params);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user