Filter out one category from listing_div.php
14 years 1 month ago #69684
by jansuhr
Jan Suhr
www.colorconsult.se www.jansuhr.se
Filter out one category from listing_div.php was created by jansuhr
In the category view I use the DIV listing. But there is one specific category I don't want to be listed at all.
This category contains just one specific product and it is a subcategory. In the listing of this main category I don't want this subcategory to be displayed at all. In the description of the main category I will have a link to the product page of this specific product.
There doesn't seem to be anyway of doing this without do some adjustments to the code of category/listing_div.php
I was thinking that you might be able to ad something like:
If not category_id==135{
<div class="hikashop_subcategories">
Bla bla
</div>
}
Category 135 being the one I don't want to be displayed.
Could you advise how to get hold of the category_id on the listing_div page?
Is it possible?
Thanks
Jan
This category contains just one specific product and it is a subcategory. In the listing of this main category I don't want this subcategory to be displayed at all. In the description of the main category I will have a link to the product page of this specific product.
There doesn't seem to be anyway of doing this without do some adjustments to the code of category/listing_div.php
I was thinking that you might be able to ad something like:
If not category_id==135{
<div class="hikashop_subcategories">
Bla bla
</div>
}
Category 135 being the one I don't want to be displayed.
Could you advise how to get hold of the category_id on the listing_div page?
Is it possible?
Thanks
Jan
Jan Suhr
www.colorconsult.se www.jansuhr.se
Please Log in or Create an account to join the conversation.
14 years 1 month ago #69782
by Xavier
Replied by Xavier on topic Re: Filter out one category from listing_div.php
Hi Jan,
To hide this category you just need to add this line:
After:
in the "category / listing_div" view.
To hide this category you just need to add this line:
Code:
if($row->category_id == '12') continue;
After:
Code:
foreach($this->rows as $row){
if($only_if_products && $row->number_of_products<1)
continue;
in the "category / listing_div" view.
The following user(s) said Thank You: jansuhr
Please Log in or Create an account to join the conversation.
14 years 1 month ago #69810
by jansuhr
Jan Suhr
www.colorconsult.se www.jansuhr.se
Replied by jansuhr on topic Re: Filter out one category from listing_div.php
Thanks Xavier, worked perfectly 
Jan
Jan
Jan Suhr
www.colorconsult.se www.jansuhr.se
Please Log in or Create an account to join the conversation.
Time to create page: 0.053 seconds