Jump to content


lucifermagnus

Member Since 28 Nov 2016
Offline Last Active Nov 28 2016 04:16 PM
-----

Posts I've Made

In Topic: change default product view to list in prestashop 1.6

28 November 2016 - 02:42 PM

hello vekia

i followed your and it made no change for me. Only that the LIST button appears selected by default, but products are still a grid.

 

What am I doing wrong? I've find the files and did all the modifications; but it seems nothing changes. [ www.beltercosmetic.ro ]. I use a custom theme.

I've modified as you said in themes/default-bootstrap/produt-list.tpl + JS directory , and I've done it into the TPL and JS ot the theme itself.

My global.JS code of the initial function looks like this:

"

var view = $.totalStorage('display');

 
if (!view && (typeof displayList != 'undefined') && displayList)
view = 'list';
 
if (view && view != 'grid')
display(view);
else
$('.display').find('li#grid').addClass('selected');
 
$(document).on('click', '#grid', function(e){
e.preventDefault();
display('grid');
});
 
$(document).on('click', '#list', function(e){
e.preventDefault();
display('list');
"