From ae5fd0b74c3f1d77b67136157e93297ae405e24f Mon Sep 17 00:00:00 2001 From: mDeflotte Date: Wed, 25 Apr 2012 12:13:08 +0000 Subject: [PATCH] [-] MO : #PSTEST-1181 - blockcurrencies bug with catalog mode git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14868 b9a71923-0436-4b27-9f14-aed3839534dd --- modules/blockcurrencies/blockcurrencies.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/modules/blockcurrencies/blockcurrencies.php b/modules/blockcurrencies/blockcurrencies.php index caeb7f20b..1e1725c38 100644 --- a/modules/blockcurrencies/blockcurrencies.php +++ b/modules/blockcurrencies/blockcurrencies.php @@ -52,11 +52,14 @@ class BlockCurrencies extends Module private function _prepareHook($params) { if (Configuration::get('PS_CATALOG_MODE')) - return; + return false; if (!count(Currency::getCurrencies())) - return ''; + return false; + $this->smarty->assign('blockcurrencies_sign', $this->context->currency->sign); + + return true; } /** @@ -67,8 +70,8 @@ class BlockCurrencies extends Module */ public function hookTop($params) { - $this->_prepareHook($params); - return $this->display(__FILE__, 'blockcurrencies.tpl'); + if ($this->_prepareHook($params)) + return $this->display(__FILE__, 'blockcurrencies.tpl'); } public function hookHeader($params) @@ -80,8 +83,8 @@ class BlockCurrencies extends Module public function hookDisplayMobileFooterChoice($params) { - $this->_prepareHook($params); - return $this->display(__FILE__, 'blockmobilecurrencies.tpl'); + if ($this->_prepareHook($params)) + return $this->display(__FILE__, 'blockmobilecurrencies.tpl'); } }