Lukas Erhart
Hi,
I think there's a bug in the exclusion in combination with the childs configuration.
What I want to accomplish:
- Show a module on all virtuemart category pages except one category-tree (has multiple nested child-category-trees).
How I tried it:
- Set matching method to all
- Set all assignments to ignore
- Set Virtuemart Page Types to include and select categories and category layout
- Set Virtuemart Categories to exclude and select a parent category, then also childs to yes and tick both page-type checkboxes
Now the module will be shown an all category-pages expect the selected parent category.
The childs of this parent category also are showing the module and that shouldn't be the case with this configuration.
I've debugged this and the problem comes from the line 94 in the file VirtuemartCategory.php.
If you change the line
from
if ( ! $pass && $this->params->inc_children)
to
if ( $this->params->inc_children)
the whole exclusion does also work on the childs.
As I saw in all other ...Category.php files, it's always the same code, so I think this bug affects all others with a child option too.
Sure it's not the best fix but it does work.
Greetings