Prestashop: Fix layered navigation block doesn’t keep order position of filters

Info: It repairs one file: blocklayered_admin.js in the module

If you’re using other themes look for the corresponding file to make the change
e.g. warehouse theme
look for

if (typeof filters !== 'undefined')
filters = JSON.parse(filters);
var filtertmp = []; //filter sort fix
var filteri = 0; //filter sort fix

for (filter in filters)
//filter sort fix start
var elt = document.getElementById(filter);
var eltli = elt.parentNode.parentNode.parentNode; /* the LI */
var eltul = elt.parentNode.parentNode.parentNode.parentNode; /* the UL */
filtertmp[filteri++] = eltul.removeChild(eltli);
for(var i=0; i

This entry was posted in troubleshoot and tagged , , . Bookmark the permalink.