Jump to content
kavenaghi

Layered navigation collapse toggle stops working after selecting filter

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)

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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?

 

 

Share this post


Link to post
Share on other sites
On 9/13/2018 at 7:30 PM, marianne@fitmind.nl 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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More