S
S
Sergey2013-11-14 22:04:19
PHP
Sergey, 2013-11-14 22:04:19

PrestaShop, changing the default state of the filter list from expanded to collapsed

PrestaShop 1.5.6
When going to the catalog with products, the standard behavior is to display filters by properties in the expanded state. How can I reverse this behavior?
I found the place for processing the click and the location of the button (symbol):
https://github.com/PrestaShop/PrestaShop/tree/development/modules/blocklayered
Blocklayered.js file:

function openCloseFilter()
{
  $('#layered_form span.layered_close a').live('click', function(e)
  {
    if ($(this).html() == '<')
    {
      $('#'+$(this).attr('rel')).show();
      $(this).html('v');
      $(this).parent().removeClass('closed');
    }
    else
    {
      $('#'+$(this).attr('rel')).hide();
      $(this).html('<');
      $(this).parent().addClass('closed');
    }
    
    e.preventDefault();
  });
}

In the blocklayered.tpl file, the form itself (for example, on line 88.)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question