Jump to content

layered navigation block - first click issue


rtvt

Recommended Posts

Hello guys, There is some issue abou layered navigation block. Look by steps:

1) I open any category. end of address: ..en/3-women

2) In color filter, I click on color name (not colored square) - in address bar I have now ..en/3-women#/ - and of course i have no result in product list.

3) I click on this name second time - and now i have ..en/3-women#/color-white  - and result - displaying only white color products.

 

How to solve this issue? Of course it should works by the first click.

 

P.S.: If you click on the colored square (not a name of color) - it works by frist click. But people clicking on name more often.

 

Where you can test it: http://roythemes.com/demo/test3/ru/3-women

 

Thank you.

 

  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...

FIXED!!

 

On /themes/default-bootstrap/modules/blocklayered/blocklayered.tpl

 

find:

 

<label for="layered_{$filter.type_lite}_{$id_value}"{if !$value.nbr} class="disabled"{else}{if isset($filter.is_color_group) && $filter.is_color_group} name="layered_{$filter.type_lite}_{$id_value}" class="layered_color" rel="{$id_value}_{$filter.id_key}"{/if}{/if}>

 

replace with:

 

<label for="layered_{$filter.type_lite}_{$id_value}"{if !$value.nbr} class="disabled"{/if}>

 

It fixed it for me :-)

  • Like 1
Link to comment
Share on other sites

  • 3 months later...

This didn't work for me.

 

At this point when I click on a label, the loader appears, the URL gets its suffix, then this suffix disappears and ALL the products are displayed again, as if there was no filter.

If i click on a square, everything works fine. 

I'm not able to find any solution yet.

Link to comment
Share on other sites

  • 3 weeks later...

in your blocklayered.js replace

 

$('#layered_block_left label a').on({
click: function(e) {
e.preventDefault();
var disable = $(this).parent().parent().find('input').attr('disabled');
if (disable == ''
|| typeof(disable) == 'undefined'
|| disable == false)
{
$(this).parent().parent().find('input').click();
reloadContent(true);
}
}
});
 
By
 
$(document).on('click','#layered_block_left label a', function(e){
e.preventDefault();
var disable = $(this).parent().parent().find('input').attr('disabled');
if (disable == ''
|| typeof(disable) == 'undefined'
|| disable == false)
{
$(this).parent().parent().find('input').click();
reloadContent(true);
}
 
});
Link to comment
Share on other sites

  • 2 weeks 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...