From 3b2b718f8417d90ff468847965d8efa32cf2ef74 Mon Sep 17 00:00:00 2001 From: PrestaEdit Date: Tue, 22 Jan 2013 23:50:52 +0100 Subject: [PATCH] [-] MO: fix a problem with the wishlist_link With @ArtDesign, we see that if you put the module "Block MyAccount" before the "Wishlist", the wishlist_link var is not declare yet, so the link is empty. If you put the var in the header, it can be accessed by the other tpl. Or, we can put this in a {$link->getModuleLink(...)} in TPL --- modules/blockwishlist/blockwishlist.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/blockwishlist/blockwishlist.php b/modules/blockwishlist/blockwishlist.php index 685758dd8..91bd4a994 100644 --- a/modules/blockwishlist/blockwishlist.php +++ b/modules/blockwishlist/blockwishlist.php @@ -170,6 +170,8 @@ class BlockWishList extends Module { $this->context->controller->addCSS(($this->_path).'blockwishlist.css', 'all'); $this->context->controller->addJS(($this->_path).'js/ajax-wishlist.js'); + + $this->smarty->assign(array('wishlist_link' => $this->context->link->getModuleLink('blockwishlist', 'mywishlist'))); } public function hookRightColumn($params) @@ -203,8 +205,6 @@ class BlockWishList extends Module else $this->smarty->assign(array('wishlist_products' => false, 'wishlists' => false)); - $this->smarty->assign(array('wishlist_link' => $this->context->link->getModuleLink('blockwishlist', 'mywishlist'))); - return ($this->display(__FILE__, 'blockwishlist.tpl')); }