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'}