[-] 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
This commit is contained in:
PrestaEdit
2013-01-22 23:50:52 +01:00
parent caf95de092
commit 3b2b718f84
+2 -2
View File
@@ -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'));
}