Page 1 of 1

Block subcategory products

Posted: 25 Feb 2024, 18:45
by Xeno
Greetings!
Does anyone have any idea how I could make it so that I can hide the products that appear in the sub and sub-sub and so on categories and only display the sub-(sub-)categories? I tried to dig into the php view files, but I couldn't find

Also, could I somehow display how many products are in each category (sub-category- sub-sub-category....)?

Thank you very much!

Re: Block subcategory products

Posted: 27 Feb 2024, 17:42
by Jan
Hi, sorry, I don't fully understand what do you exactly mean?

Jan

Re: Block subcategory products

Posted: 28 Feb 2024, 12:23
by Xeno
Hi!
I wanted to make sure that in the main categories, as long as there is a subcategory, the products do not appear there.
I have achieved this:

/components/com_phocacart/views/category/tmpl/default.php

[43. Insert in the row:]
if(!empty($this->loadTemplate('subcategories'))){
//echo "There is a subcategory, I don't display the products...";
}
else{
.....

[520. Insert in the row: only one closing tag]
}

I looked for a better solution, but this was all I could do.

Thx!