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

This commit is contained in:
rMalie committed 2011-09-22 12:05:49 +00:00
1 parent 4710279406
commit 668a8d333c
19 files changed
+174 -155

No files matched your search

+6 -7
View File
@@ -1,6 +1,6 @@
<?php
/*
* 2007-2011 PrestaShop
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
@@ -27,7 +27,7 @@
if (!defined('_PS_VERSION_'))
exit;
class BlockCurrencies extends Module
{
public function __construct()
@@ -39,7 +39,7 @@ class BlockCurrencies extends Module
$this->need_instance = 0;
parent::__construct();
$this->displayName = $this->l('Currency block');
$this->description = $this->l('Adds a block for selecting a currency.');
}
@@ -60,13 +60,12 @@ class BlockCurrencies extends Module
if (Configuration::get('PS_CATALOG_MODE'))
return ;
$currencies = Currency::getCurrencies();
if (!sizeof($currencies))
if (!count(Currency::getCurrencies()))
return '';
$this->context->smarty->assign('currencies', $currencies);
return $this->display(__FILE__, 'blockcurrencies.tpl');
}
public function hookHeader($params)
{
if (Configuration::get('PS_CATALOG_MODE'))
+1 -1
View File
@@ -1,5 +1,5 @@
{*
* 2007-2011 PrestaShop
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*