Hello Jan,
It looks like doing this right now is not as simple as it could be.
I've reported this to the XC5 team:
https://bt.x-cart.com/view.php?id=43921
Perhaps, they could improve this in the next XC5 version.
The problem is that ProductVariants override the isVisible() method for TopCategories as follows:
Code:
protected function isVisible()
{
return parent::isVisible()
&& 'category_filter' != $this->getTarget();
}
So, you can't hack on top and get rid of this check from your module. And you can't just return "true", as this will make the menu visible on every website page (that may be a problem).
Try the following: override the method and copy&paste the code from the original TopCategories class. Add ProductFilter to the @LC_Dependencies tag so that your method will stack on top of the ProductFilter's one:
Code:
namespace XLite\Module\CustomSkin\View;
/**
* @inherit
*
* @LC_Dependencies ("XC\ProductFilter")
*/
class TopCategories extends \XLite\View\TopCategories implements \XLite\Base\IDecorator
{
/**
* @inherit
*/
protected function isVisible()
{
return $this->checkTarget() && $this->checkMode() && $this->checkACL();
}
}
This may work for you.