[+] MO: Add Module->smartyAssign method, in order to assign variables with module name as prefix in module's templates

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8718 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-09-22 12:05:49 +00:00
parent b24d2fa274
commit 2dbea99b61
19 changed files with 174 additions and 155 deletions
+5 -4
View File
@@ -1,6 +1,6 @@
<?php
/*
* 2007-2011 PrestaShop
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
@@ -39,7 +39,7 @@ class BlockUserInfo extends Module
$this->need_instance = 0;
parent::__construct();
$this->displayName = $this->l('User info block');
$this->description = $this->l('Adds a block that displays information about the customer.');
}
@@ -59,7 +59,8 @@ class BlockUserInfo extends Module
{
if (!$this->active)
return;
$this->context->smarty->assign(array(
$this->smartyAssign(array(
'cart' => $this->context->cart,
'cart_qties' => $this->context->cart->nbProducts(),
'logged' => $this->context->customer->isLogged(),
@@ -70,7 +71,7 @@ class BlockUserInfo extends Module
));
return $this->display(__FILE__, 'blockuserinfo.tpl');
}
public function hookHeader($params)
{
$this->context->controller->addCSS(($this->_path).'blockuserinfo.css', 'all');