Jump to content

modifying the Blocklayered


Recommended Posts

Hi,

 

I'm working on a car part shop and I need help with the layered navigation block.  I want to know if it is possible to make the features list openning and closing.

 

By now it look like this:

post-899396-0-03080000-1424723886_thumb.jpg

 

And I want it to look like this

post-899396-0-04629100-1424724276_thumb.jpg

 

Thanks for your help

 

Link to comment
Share on other sites

I just saw that the module is able to do what I want.  The problem is in the module configurations.  When you create a new filter, you choose a feature you what to filter and at the extrem right, with a dropdown menu, you can choose how many feature filters the user will see: no limits, 4, 5, 10, 20.  I have set it to 4 and I was able to see the 4 first feature filters and there was a see more button to see all the other ones.  Is there a way to add a new value that will be 0 ?  In the "languages" files, I'll be able to change the "see more" to be a "+".

 

Thank you

Link to comment
Share on other sites

hi,

my module show all subcategories, even if they're inactive. the code to modify is this on blocklayered.php?

 
case 'category':
$categories = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
SELECT cl.name, cl.id_lang, c.id_category
FROM '._DB_PREFIX_.'category c
INNER JOIN '._DB_PREFIX_.'category_lang cl ON (c.id_category = cl.id_category)
WHERE  cl.id_lang = '.(int)$filter['id_lang']);
foreach ($categories as $category)
{
if (!isset($attribute_values_by_lang[$category['id_lang']]))
$attribute_values_by_lang[$category['id_lang']] = array();
if (!isset($attribute_values_by_lang[$category['id_lang']]['category']))
$attribute_values_by_lang[$category['id_lang']]['category'] = array();
$attribute_values_by_lang[$category['id_lang']]['category'][] = array('name' => $this->translateWord('Categories', $category['id_lang']),
'id_name' => null, 'value' => $category['name'], 'id_value' => $category['id_category'],
'category_name' => $filter['link_rewrite'], 'type' => $filter['type']);
}
break;
 
i tried to add WHERE c.active=1 AND...
but it doesn't work. 
 
Any help?
 
Also, i would like order subcategories by name. is it possible?
 
Thanks in advance.
Edited by elisa1212 (see edit history)
Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...