// Context part 31
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8087 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -33,7 +33,7 @@ require_once(dirname(__FILE__).'/../../init.php');
|
||||
|
||||
require_once(dirname(__FILE__).'/FavoriteProduct.php');
|
||||
|
||||
if (!Context::getContext()->cookie->isLogged())
|
||||
if (!Context::getContext()->customer->isLogged())
|
||||
Tools::redirect('authentication.php?back=modules/favoriteproducts/favoriteproducts.php');
|
||||
|
||||
include(dirname(__FILE__).'/../../header.php');
|
||||
|
||||
@@ -78,7 +78,7 @@ class FavoriteProducts extends Module
|
||||
{
|
||||
include_once(dirname(__FILE__).'/FavoriteProduct.php');
|
||||
|
||||
$favoriteProducts = FavoriteProduct::getFavoriteProducts((int)$this->context->cookie->id_customer, (int)$this->context->cookie->id_lang);
|
||||
$favoriteProducts = FavoriteProduct::getFavoriteProducts($this->context->customer->id, $this->context->language->id);
|
||||
|
||||
$this->context->smarty->assign(array('favorite_products' => $favoriteProducts));
|
||||
|
||||
@@ -95,8 +95,8 @@ class FavoriteProducts extends Module
|
||||
include_once(dirname(__FILE__).'/FavoriteProduct.php');
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'isCustomerFavoriteProduct' => (FavoriteProduct::isCustomerFavoriteProduct((int)($this->context->cookie->id_customer), Tools::getValue('id_product')) ? 1 : 0),
|
||||
'isLogged' => (int)$this->context->cookie->id_customer));
|
||||
'isCustomerFavoriteProduct' => (FavoriteProduct::isCustomerFavoriteProduct($this->context->customer->id, Tools::getValue('id_product')) ? 1 : 0),
|
||||
'isLogged' => (int)$this->context->customer->logged));
|
||||
|
||||
return $this->display(__FILE__, 'favoriteproducts-extra.tpl');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user