bannedillo Posted May 22, 2013 Share Posted May 22, 2013 Hello, I want that the module blocklayered set by default: check in stock. So if you enter to a category, by default will show all the products wich are in stock, right now. Is it posible? i had try, but with no luck. thanks in advance. Link to comment Share on other sites More sharing options...
NemoPS Posted May 22, 2013 Share Posted May 22, 2013 You could try with a custom jquery script. CHeck what's the ID for that checkbox, then, in your script add something like $('#elementid').click() and have it sun as soon as the page is ready (category pages only) Link to comment Share on other sites More sharing options...
bannedillo Posted May 22, 2013 Author Share Posted May 22, 2013 thanks for the fast reply, this looks very dificult for me, isn it something easier, right? thanks! Link to comment Share on other sites More sharing options...
NemoPS Posted May 22, 2013 Share Posted May 22, 2013 I'll go straight to the point: no. Only harder ways, this is really easy, it should work Link to comment Share on other sites More sharing options...
bannedillo Posted May 22, 2013 Author Share Posted May 22, 2013 thanks for the reply, ok, i will try to make it work. Link to comment Share on other sites More sharing options...
bannedillo Posted May 22, 2013 Author Share Posted May 22, 2013 (edited) I have tried with on category.tpl <script>$(document).ready(function(){ $('layered_selection_stock').trigger('click'); });</script> and <script>$('layered_selection_stock').click()</script> But no luck Edited May 22, 2013 by bannedillo (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted May 22, 2013 Share Posted May 22, 2013 Of course not, you must specify if that is an id (#) or class(.). also, you need to wrap inside a jquery.ready() Link to comment Share on other sites More sharing options...
bannedillo Posted May 22, 2013 Author Share Posted May 22, 2013 <script>$(document).ready(function(){ $('#layered_quantity_1').click(); }); </script> Works! Thanks Link to comment Share on other sites More sharing options...
angrycat Posted July 28, 2013 Share Posted July 28, 2013 <script>$(document).ready(function(){ $('#layered_quantity_1').click(); }); </script> Works! Thanks Many Thanks bannedillo You saved my life! Link to comment Share on other sites More sharing options...
Recommended Posts