[-] 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:
1 parent
f5c2d8e826
commit
94c84b41cf
1 file changed
+2
-2
@@ -170,6 +170,8 @@ class BlockWishList extends Module
|
|||||||
{
|
{
|
||||||
$this->context->controller->addCSS(($this->_path).'blockwishlist.css', 'all');
|
$this->context->controller->addCSS(($this->_path).'blockwishlist.css', 'all');
|
||||||
$this->context->controller->addJS(($this->_path).'js/ajax-wishlist.js');
|
$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)
|
public function hookRightColumn($params)
|
||||||
@@ -203,8 +205,6 @@ class BlockWishList extends Module
|
|||||||
else
|
else
|
||||||
$this->smarty->assign(array('wishlist_products' => false, 'wishlists' => false));
|
$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'));
|
return ($this->display(__FILE__, 'blockwishlist.tpl'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user