Jump to content

Layered navigation collapse toggle stops working after selecting filter


kavenaghi

Recommended Posts

Hello,

When I'm on mobile/tablet width size and I see left column as collapsible toggles. I open Layered Navigation toggle. The PLUS sign changes to MINUS sign. I select some filter - anything. The toggle sign changes back to PLUS (like if it was closed) and the toggle stops working. It's stuck and I cannot open it or close it. Other toggles, for example category or CMS links continue to work fine.

How I can fix that issue for mobile devices?

Prestashop 1.6.1.17

 

Thank you.

Edited by kavenaghi (see edit history)
Link to comment
Share on other sites

  • 2 months later...

Hi, I have resolved adding it to my blocklayered.js:

look for this line:

$('#layered_block_left').replaceWith(utf8_decode(result.filtersBlock));

And then add this code (the second part fix the plus icon if is opened the filter):
            

           $('#layered_block_left .title_block').on('click', function(event){
                $(this).toggleClass('active').parent().find('.block_content').stop().slideToggle('medium');
            });
            
            if($('#layered_block_left .block_content:visible').length>0){
                $('#layered_block_left p.title_block').addClass('active');
            }

Maybe is not the best solution but prestashop has this bug as minor and I do not know when they will fix....

Link to comment
Share on other sites

  • 3 months later...
On 28-5-2018 at 8:40 PM, val_carter said:

Hi, I have resolved adding it to my blocklayered.js:

look for this line:

$('#layered_block_left').replaceWith(utf8_decode(result.filtersBlock));

And then add this code (the second part fix the plus icon if is opened the filter):
            

           $('#layered_block_left .title_block').on('click', function(event){
                $(this).toggleClass('active').parent().find('.block_content').stop().slideToggle('medium');
            });
            
            if($('#layered_block_left .block_content:visible').length>0){
                $('#layered_block_left p.title_block').addClass('active');
            }

Maybe is not the best solution but prestashop has this bug as minor and I do not know when they will fix....

Hi,

I have exact the same problem.

i tried your solution, also in PS 1.6.1.17 but it does not make a difference for me.

Searching for a solution i see that many people searched for this problem but most questions unanswered.

Are you sure that this code worked for you?

Do you have any other suggestion?

 

 

Link to comment
Share on other sites

  • 2 months later...
On 9/13/2018 at 7:30 PM, [email protected] said:

Hi,

I have exact the same problem.

i tried your solution, also in PS 1.6.1.17 but it does not make a difference for me.

Searching for a solution i see that many people searched for this problem but most questions unanswered.

Are you sure that this code worked for you?

Do you have any other suggestion?

 

 

Are you using a theme? maybe your theme is using the file placed in:

...../themes/YOUR_ACTIVE_THEME/js/modules/blocklayered/blocklayered.js

Thank's to val_carter this solution works great. Just make the changes in this file.

Link to comment
Share on other sites

22 hours ago, kavenaghi said:

Are you using a theme? maybe your theme is using the file placed in:

...../themes/YOUR_ACTIVE_THEME/js/modules/blocklayered/blocklayered.js

Thank's to val_carter this solution works great. Just make the changes in this file.

Hello Kavenaghi,

Thank you for your reply, I went in and tried again.

I added the code exactly there in that file in the theme directory (my ps version is now 1.6.1.23) but no changes at all.

Also tried to do the changes in the folder modules/blocklayered/blocklayered.js with no results.

The filter menu does not collapse and the + does not change to a minus.

Only way to collapse the filtermenu (after you used the menu by selecting and then de-selecting a filter) is to refresh the page.

Link to comment
Share on other sites

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...