Request - Don't show filters for empty Values

  • Posts: 43
  • Thank you received: 3
10 years 3 weeks ago #177989

-- HikaShop version -- : 2.3.4
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.3.28
-- Browser(s) name and version -- : Fire Fox 32.0.3

Hi,

I just want to request if possible in next HikaShop Version to have some button that disables Filter to show empty fields.

I had to create a Field in each Personalized Field like "Choose Value" but it's empty, just the Title, this field is to use when a product don't have one characteristic even all the rest had, so if I don't have this field I had to choose some other that is wrong for visitors to see.

The problem is that this field is shown in the filters and everytime I update the hikashop component I have to go to administrator/components/com_hikashop/classes/filters and add this

if(empty($val[0])) continue;
$html.='<span class="hikashop_filter_checkbox">'.$input.'<label for="field_'.$filter->filter_id.'_'.$key.'_'.$divName.'">'.JText::_(JText::_($val[1])).'</label>'.$deleteButton.'</span>';

in line 1617

I remove the BR to, no need this, just CSS.

Thanks for all your help

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

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
10 years 3 weeks ago #178029

Hi,

That's not possible.
Other users have custom fields with an empty value for a real choice of their custom field that they are using so we can't just remove from the filter choices for everyone because you don't want it.
In that case, the solution is to use a class override :
www.hikashop.com/support/forum/product-c...php-file.html#149777

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

  • Posts: 43
  • Thank you received: 3
10 years 2 weeks ago #178312

Hi nicolas,

I think the Overwrite will be something like I'm doing because when I need to update I will always need to check the overwrites for different things in the code.

If you put a button in Configuration > Functions > Filters (don't know if it's the write spelling, mine is in a different language)
Just saying, disable empty values from filters so people like me can turn it on if needed. by default it could be showing everything.

Thanks again

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

Time to create page: 0.062 seconds
Powered by Kunena Forum