// theme installation

This commit is contained in:
Damien Metzger
2013-10-24 09:49:46 +02:00
parent d9382a0a5b
commit e17dd1fdde
5 changed files with 76 additions and 74 deletions
@@ -105,7 +105,9 @@ class BlockNewProducts extends Module
protected function getCacheId($name = null)
{
return parent::getCacheId('blocknewproducts|'.date('Ymd'));
if ($name === null)
$name = 'blocknewproducts';
return parent::getCacheId($name.'|'.date('Ymd'));
}
public function hookLeftColumn($params)
@@ -125,7 +127,7 @@ class BlockNewProducts extends Module
public function hookHeader($params)
{
$this->context->controller->addCSS(($this->_path).'blocknewproducts.css', 'all');
$this->context->controller->addCSS($this->_path.'blocknewproducts.css', 'all');
}
public function hookAddProduct($params)
+3 -5
View File
@@ -61,8 +61,7 @@ class Blocknewsletter extends Module
public function install()
{
if (parent::install() == false || $this->registerHook('leftColumn') == false || $this->registerHook('header') == false
|| $this->registerHook('actionCustomerAccountAdd') == false)
if (!parent::install() || !$this->registerHook(array('header', 'footer', 'actionCustomerAccountAdd')))
return false;
Configuration::updateValue('NW_SALT', Tools::passwdGen(16));
@@ -83,9 +82,8 @@ class Blocknewsletter extends Module
public function uninstall()
{
if (!parent::uninstall())
return false;
return Db::getInstance()->execute('DROP TABLE '._DB_PREFIX_.'newsletter');
Db::getInstance()->execute('DROP TABLE '._DB_PREFIX_.'newsletter');
return parent::uninstall();
}
public function getContent()