Filters and access levels

  • Posts: 65
  • Thank you received: 0
12 years 11 months ago #32269

Hello
I have a filter of a custom field called "color" and I want it to show up only for registered users (in my case I created a user group called profesionals). But when I set the access level in the filter settings it doesnt work. It keeps on showing up for all users, even if I set access level to none it shows up. Why is this happenning? how does the access level in filters work? how can i make it show up only for registered users?

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

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
12 years 11 months ago #32293

Hi,

Indeed, there is some code missing.
Please change the line:
$query='SELECT * FROM '.hikashop_table('filter').' WHERE filter_published = 1 ORDER BY filter_ordering';

by:
$conditions = array('filter_published = 1');
hikashop_addACLFilters($conditions,'filter_access');
$query='SELECT * FROM '.hikashop_table('filter').' WHERE '.implode(' AND ',$conditions).' ORDER BY filter_ordering';

in the file administrator/components/com_hikashop/classes/filter.php and that should make it work.

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

Time to create page: 0.051 seconds
Powered by Kunena Forum