diff --git a/classes/Module.php b/classes/Module.php index af603e46d..17cc42271 100644 --- a/classes/Module.php +++ b/classes/Module.php @@ -1237,24 +1237,6 @@ abstract class ModuleCore return ($overloaded ? _PS_THEME_DIR_.'modules/'.$this->name : _PS_MODULE_DIR_.$this->name).'/'.$template; } - /** - * Assign a smarty vars (same syntax as smarty->assign) but prefix all keys with module name - * - * @since 1.5.0 - * @param string $key Variable key (can be an array) - * @param mixed $value Variable value - */ - public function templateAssign($key, $value = null) - { - if (is_array($key)) - { - foreach ($key as $k => $v) - $this->context->smarty->assign($this->name.'_'.$k, $v); - } - else - $this->context->smarty->assign($this->name.'_'.$key, $value); - } - protected function _getApplicableTemplateDir($template) { return $this->_isTemplateOverloaded($template) ? _PS_THEME_DIR_ : _PS_MODULE_DIR_.$this->name.'/'; diff --git a/modules/blockcart/blockcart.php b/modules/blockcart/blockcart.php index b2e6a9994..25c84420f 100644 --- a/modules/blockcart/blockcart.php +++ b/modules/blockcart/blockcart.php @@ -77,10 +77,10 @@ class BlockCart extends Module if ($useTax AND Configuration::get('PS_TAX_DISPLAY') == 1) { $totalToPayWithoutTaxes = $params['cart']->getOrderTotal(false); - $this->templateAssign('tax_cost', Tools::displayPrice($totalToPay - $totalToPayWithoutTaxes, $currency)); + $this->smarty->assign('tax_cost', Tools::displayPrice($totalToPay - $totalToPayWithoutTaxes, $currency)); } - $this->templateAssign(array( + $this->smarty->assign(array( 'products' => $products, 'customizedDatas' => Product::getAllCustomizedDatas((int)($params['cart']->id)), 'CUSTOMIZE_FILE' => _CUSTOMIZE_FILE_, @@ -97,9 +97,9 @@ class BlockCart extends Module 'ajax_allowed' => (int)(Configuration::get('PS_BLOCK_CART_AJAX')) == 1 ? true : false )); if (sizeof($errors)) - $this->templateAssign('errors', $errors); + $this->smarty->assign('errors', $errors); if(isset($this->context->cookie->ajax_blockcart_display)) - $this->templateAssign('colapseExpandStatus', $this->context->cookie->ajax_blockcart_display); + $this->smarty->assign('colapseExpandStatus', $this->context->cookie->ajax_blockcart_display); } public function getContent() @@ -159,7 +159,7 @@ class BlockCart extends Module return; // @todo this variable seems not used - $this->templateAssign('order_page', strpos($_SERVER['PHP_SELF'], 'order') !== false); + $this->smarty->assign('order_page', strpos($_SERVER['PHP_SELF'], 'order') !== false); $this->assignContentVars($params); return $this->display(__FILE__, 'blockcart.tpl'); } diff --git a/modules/blockcart/blockcart.tpl b/modules/blockcart/blockcart.tpl index c634821b7..9aaef9a6f 100644 --- a/modules/blockcart/blockcart.tpl +++ b/modules/blockcart/blockcart.tpl @@ -27,9 +27,9 @@ {*************************************************************************************************************************************} {* IMPORTANT : If you change some data here, you have to report these changes in the ./blockcart-json.js (to let ajaxCart available) *} {*************************************************************************************************************************************} -{if $blockcart_ajax_allowed} +{if $ajax_allowed} @@ -38,15 +38,15 @@ var removingLinkText = '{l s='remove this product from my cart' mod='blockcart'