Jump to content


lucifermagnus's Content

There have been 1 items by lucifermagnus (Search limited from 18-May 23)


By content type

See this member's

Sort by                Order  

#13064 change default product view to list in prestashop 1.6

Posted by lucifermagnus on 28 November 2016 - 02:42 PM in PrestaShop theme development & modifications

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');
"