Show categories with customergroup prducts

  • Posts: 152
  • Thank you received: 11
11 years 11 months ago #81622

We have on our side created many categories, products and customer groups.

After some testing back and forth, it ended up that we will only use one shop for all, therefore, should we organize products to be displayed to the right groups.

It is also successful, but when I look at the shop, I can see categories where there are items in. They is not displayed to the customer. - Quite rightly, because customer group will not be able to buy the product.

I have also chosen to categories only be displayed if there are items in. But the above category are displayed, even if there are no items for this customer group.

So now comes the question, can the shop manage it so that the customer can only see the categories if there is a product that is associated with this customer group?


I'm using firebug, forumsearch, dokumentation and then I ask.. It's so easy ;)

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 11 months ago #81652

By default HikaShop don't do that, you can hide a category if no products inside but not no product for a customer group.

But you can do it in the view "category / listing_img_title" (or another one depending on which one you are using) and add a check in the file "components/com_hikashop/views/category/view.html.php" function "listing()".

Check if there is products for the current customer in the category, and if there are no products add a parameter and hide the category in the view if the parameter is true.

It require a good PHP level.

Last edit: 11 years 11 months ago by Xavier.

Please Log in or Create an account to join the conversation.

  • Posts: 152
  • Thank you received: 11
11 years 11 months ago #81820

thanks for the reply

I have not so much hardcore sense in php that I can program it .. Can easily read php .. ;)

We must just accept that, it's not all you can get, but it could be a future idea for you


I'm using firebug, forumsearch, dokumentation and then I ask.. It's so easy ;)

Please Log in or Create an account to join the conversation.

Time to create page: 0.047 seconds
Powered by Kunena Forum