// Remove Module->templateAssign() from modules (use $this->smarty->assign() instead)

This commit is contained in:
rMalie
2011-12-05 14:04:35 +00:00
parent a25d5d2488
commit 1699ae2f34
21 changed files with 86 additions and 104 deletions
+5 -5
View File
@@ -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');
}