Menu module shows all categories, even disabled

  • Posts: 179
  • Thank you received: 17
11 years 4 months ago #12072

Hi there and good morning !

On my test site I have a top menu item called products. This calls up a rather cool page with all my top level and sub category items. Very nice.

A link to it :
redcell.co.uk/test1/index.php?option=com...out=listing&Itemid=7

There is a slight error though. The categories under liferafts are showing all categories even the ones I have disabled at the moment.
(•MED Ship's Wheel
•Self righting
•Chutes, Slides & Recovery ) are all disabled but are still showing and can be selected.

Any ideas, I suspect this is just a coding oversight :)

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

  • Posts: 76101
  • Thank you received: 11907
  • MODERATOR
11 years 4 months ago #12085

Indeed. Please change the line:
$query = 'SELECT * FROM '.hikashop::table('category').' WHERE category_parent_id IN ('.implode(',',$ids).') ORDER BY category_ordering;';

by:
$childsFilters = array('category_published=1', 'category_parent_id IN ('.implode(',',$ids).')');
hikashop::addACLFilters($childsFilters,'category_access');
$query = 'SELECT * FROM '.hikashop::table('category').' WHERE '.implode(' AND ',$childsFilters).' ORDER BY category_ordering;';

in the file components/com_hikashop/views/category/view.html.php
That fix will be added to next version of HikaShop.

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

  • Posts: 179
  • Thank you received: 17
11 years 4 months ago #12098

Great , it works, thank you once again.

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

Time to create page: 0.055 seconds
Powered by Kunena Forum