Chris2013 Posted May 31, 2014 Share Posted May 31, 2014 (edited) Hello When using the Layered Navigation Module, has anyone noticed that when using The "Drop down List" as the filter style, the drop down almost disapears straight away making it virtually impossible to select an option from the list Is there a way to extend the time the stays visable, evein having the mouse over it doesnt keep it open. Any ideas Chris Edited May 31, 2014 by Chris2013 (see edit history) Link to comment Share on other sites More sharing options...
Chris2013 Posted May 31, 2014 Author Share Posted May 31, 2014 (edited) Ok I think I have worked out the problem, line 45 from in the blocklayered.js from what I have worked out is the click event (for the want of a better word) to the drop down menu which once clicked calls the reloadContent() function, this in turn reloads the content making the dropdown menu disapear so you dont get a chance to click any of the options. Just need to work out how to change that to get the #layered_category_ + the id in the dropdown, not a JS person me, any help is welcome and greatly appreciated // Click on color $(document).on('click', '#layered_form input[type=button], #layered_form label.layered_color', function(e) { if (!$('input[name='+$(this).attr('name')+'][type=hidden]').length) $('<input />').attr('type', 'hidden').attr('name', $(this).attr('name')).val($(this).attr('rel')).appendTo('#layered_form'); else $('input[name='+$(this).attr('name')+'][type=hidden]').remove(); reloadContent(); }); $(document).on('click', '#layered_form .select', function(e) { reloadContent(); }); $(document).on('click', '#layered_form input[type=checkbox], #layered_form input[type=radio]', function(e) { reloadContent(); }); Edited May 31, 2014 by Chris2013 (see edit history) Link to comment Share on other sites More sharing options...
Chris2013 Posted May 31, 2014 Author Share Posted May 31, 2014 (edited) Ok Update, Somebody will know what I'm on about when they use the Layered Navigation block on their website and select "drop-downs" as a filter style. anyway I have sorted the problem Change line 132 of blocklayered.tpl From this <option style="color: {if isset($value.color)}{$value.color}{/if}" id="layered_{$filter.type_lite}{if $id_value || $filter.type == 'quantity'}_{$id_value}{/if}" value="{$id_value}_{$filter.id_key}" {if isset($value.checked) && $value.checked}selected="selected"{/if} {if !$value.nbr}disabled="disabled"{/if}> To this (adding a class in this example "dropdown_select") <option class="dropdown_select" style="color: {if isset($value.color)}{$value.color}{/if}" id="layered_{$filter.type_lite}{if $id_value || $filter.type == 'quantity'}_{$id_value}{/if}" value="{$id_value}_{$filter.id_key}" {if isset($value.checked) && $value.checked}selected="selected"{/if} {if !$value.nbr}disabled="disabled"{/if}> Next change line 45 of blocklayered.js From this $(document).on('click', '#layered_form .select', function(e) { reloadContent(); }); To this $(document).on('click', '#layered_form .select .dropdown_select', function(e) { reloadContent(); }); hopefully that'll help someone out that has the same problem :-) Chris Edited May 31, 2014 by Chris2013 (see edit history) 1 Link to comment Share on other sites More sharing options...
more-control Posted July 15, 2014 Share Posted July 15, 2014 Hi Chris Just wanted to say many thanks for the solution. Tried it out on a test website and your mod works perfectly. 1 Link to comment Share on other sites More sharing options...
zeka35000 Posted July 29, 2014 Share Posted July 29, 2014 Hi! What is your version? Because in the PS 1.6, at the line 46 of Blocklayered.js, this is it: $('#layered_form input[type=checkbox], #layered_form input[type=radio], #layered_form select').live('change', function() { reloadContent(); }); i tried to add .dropdown_select after select but nothing works. Any idea? Thank you Link to comment Share on other sites More sharing options...
fransjaeger Posted October 17, 2014 Share Posted October 17, 2014 Hi Thanks for sharing this. Im using PS 1.6 and experiencing another issue maybe you haven t seen that with your module. When you create a filter you can change the order of appearence by drag and drop (very cool by the way) It works fine when you save. BUT when you return to adjust the filters in BO, its not orered the right way, so youll have to order it correctly before you click save. This annoys me a bit. Have any of you found a solution for that? Thanks 1 Link to comment Share on other sites More sharing options...
fransjaeger Posted October 17, 2014 Share Posted October 17, 2014 Been having a look on this again and... Maybe a better and simpler solution is this: http://forge.prestashop.com/browse/PNM-2444 I have suggested this to the github here https://github.com/michaelhjulskov/blocklayered/commit/9a845bda2b89aa2e30b1ebc435e8410658d7283f I dont see why i should make the changes to blocklayered.tpl ??? 1 Link to comment Share on other sites More sharing options...
Recommended Posts