// Context part 27

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7812 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
tDidierjean
2011-07-29 14:29:57 +00:00
parent 35748d1b8f
commit 5d090a25b3
66 changed files with 532 additions and 813 deletions
+5 -10
View File
@@ -252,16 +252,14 @@ class MailAlerts extends Module
public function hookProductOutOfStock($params)
{
global $smarty, $cookie;
if (!$this->_customer_qty)
return ;
$id_product = (int)($params['product']->id);
$id_product_attribute = 0;
if (!$cookie->isLogged())
$smarty->assign('email', 1);
if (!$this->context->cookie->isLogged())
$this->context->smarty->assign('email', 1);
else
{
$id_customer = (int)($params['cookie']->id_customer);
@@ -269,7 +267,7 @@ class MailAlerts extends Module
return ;
}
$smarty->assign(array(
$this->context->smarty->assign(array(
'id_product' => $id_product,
'id_product_attribute' => $id_product_attribute));
@@ -289,8 +287,6 @@ class MailAlerts extends Module
public function hookUpdateQuantity($params)
{
global $cookie;
if (is_object($params['product']))
$params['product'] = get_object_vars($params['product']);
@@ -309,9 +305,8 @@ class MailAlerts extends Module
'{qty}' => $qty,
'{last_qty}' => (int)(Configuration::get('MA_LAST_QTIES')),
'{product}' => strval($params['product']['name']).(isset($params['product']['attributes_small']) ? ' '.$params['product']['attributes_small'] : ''));
$id_lang = (is_object($cookie) AND isset($cookie->id_lang)) ? (int)$cookie->id_lang : (int)Configuration::get('PS_LANG_DEFAULT');
$iso = Language::getIsoById((int)$id_lang);
$iso = $this->context->language->iso_code;
if ($params['product']['active'] == 1)
{
if (file_exists(dirname(__FILE__).'/mails/'.$iso.'/productoutofstock.txt') AND file_exists(dirname(__FILE__).'/mails/'.$iso.'/productoutofstock.html'))