Post by lpotts » Wed Sep 18, 2013 4:48 pm

Hi all,

I was looking to change the view to a default of grid view, i was advised to change the tpls in the catalog template files, from:

if (view) {
display(view);
} else {
display('list');
}

Replace that with

if (view) {
display(view);
} else {
display('grid');
}

But this doesn't seem to have worked for us on our Manufacturer category pages, possibly because there was no instance of the above code in the manufacturer tpl's. Any help would be extremely welcome,

Luke

New member

Posts

Joined
Wed Jan 09, 2013 2:06 am

Post by matteoraggi » Wed Sep 18, 2013 4:57 pm

Why don't use an extension for that?
http://www.opencart.com/index.php?route ... earch=grid

http://www.restaurantsupplies.eu Restaurant Supplies
Opencart 1.5.6.4 VQMOD 2.4.1
Languages: Italian, French, German, Hungarian, English, Russian, Polish and Spanish


Active Member

Posts

Joined
Fri Apr 10, 2009 8:16 pm

Post by k2tec » Wed Sep 18, 2013 5:01 pm

It has to be there in manufacturer_info.tpl

Code: Select all

view = $.totalStorage('display');

if (view) {
	display(view);
} else {
	display('list');
}
//--></script> 
<?php echo $footer; ?>
Do you use default template?

User avatar
Active Member

Posts

Joined
Mon Apr 12, 2010 8:06 pm

Post by lpotts » Wed Sep 18, 2013 5:09 pm

We use the Journal theme?
Possibly we should go and change the default tpl's also?

New member

Posts

Joined
Wed Jan 09, 2013 2:06 am

Post by lpotts » Wed Sep 18, 2013 5:13 pm

Actually, we seem to have changed them now, I must have mis-read. Could someone see if our site now defaults on grid view?
www.designer-man.co.uk

New member

Posts

Joined
Wed Jan 09, 2013 2:06 am

Post by lpotts » Wed Sep 18, 2013 5:15 pm

I did notice that only a couple of our tpl's start with:
view = $.totalStorage('display');

Whereas the rest don't have .totalStorage, but .Cookie?

New member

Posts

Joined
Wed Jan 09, 2013 2:06 am

Post by k2tec » Wed Sep 18, 2013 5:22 pm

It's grid view

User avatar
Active Member

Posts

Joined
Mon Apr 12, 2010 8:06 pm
Who is online

Users browsing this forum: No registered users and 17 guests