From 0ac5fe3dd2153c6ef28047fd9ce75f9d225fcaa5 Mon Sep 17 00:00:00 2001 From: aFolletete Date: Sat, 19 May 2012 12:53:33 +0000 Subject: [PATCH] // fix little issue on Favorites Product module --- modules/favoriteproducts/favoriteproducts.php | 11 +++-------- .../views/templates/hook/my-account.tpl | 6 +++--- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/modules/favoriteproducts/favoriteproducts.php b/modules/favoriteproducts/favoriteproducts.php index 693466390..ec09ba08e 100644 --- a/modules/favoriteproducts/favoriteproducts.php +++ b/modules/favoriteproducts/favoriteproducts.php @@ -78,19 +78,14 @@ class FavoriteProducts extends Module public function hookDisplayCustomerAccount($params) { - include_once(dirname(__FILE__).'/FavoriteProduct.php'); - - $products = FavoriteProduct::getFavoriteProducts($this->context->customer->id, $this->context->language->id); - $this->smarty->assign(array( - 'favorite_products' => $products, - )); - + $this->smarty->assign('in_footer', false); return $this->display(__FILE__, 'my-account.tpl'); } public function hookDisplayMyAccountBlock($params) { - return $this->hookDisplayCustomerAccount($params); + $this->smarty->assign('in_footer', true); + return $this->display(__FILE__, 'my-account.tpl'); } public function hookDisplayLeftColumnProduct($params) diff --git a/modules/favoriteproducts/views/templates/hook/my-account.tpl b/modules/favoriteproducts/views/templates/hook/my-account.tpl index 04f44b5a7..d4a36eb26 100644 --- a/modules/favoriteproducts/views/templates/hook/my-account.tpl +++ b/modules/favoriteproducts/views/templates/hook/my-account.tpl @@ -25,8 +25,8 @@ *}
  • - - - {l s='My favorite products' mod='favorite products'} + + {if !$in_footer}{/if} + {l s='My favorite products' mod='favoriteproducts'}