Changing default view to grid
30 posts
• Page 1 of 2 • 1, 2
Changing default view to grid
I'm having trouble setting my default view in categories from list to grid.
I've tried a few things from other threads on the forum including downloading the vqmod and adding this mod uksb_grid_view_default.xml but it hasn't changed the view, despite clearing cookies.
I'm using the default template of Opencart 1.5.2.1 - so do I need to make changes to anything in my admin area to make the default grid setting apply?
This is my store: http://www.tutuswingsandprettythings.com
Any help is greatly appreciated!
I've tried a few things from other threads on the forum including downloading the vqmod and adding this mod uksb_grid_view_default.xml but it hasn't changed the view, despite clearing cookies.
I'm using the default template of Opencart 1.5.2.1 - so do I need to make changes to anything in my admin area to make the default grid setting apply?
This is my store: http://www.tutuswingsandprettythings.com
Any help is greatly appreciated!
- Cassiefa
- Posts: 1
- Joined: Wed Apr 11, 2012 3:37 pm
Re: Changing default view to grid
Hello Casiefa,
Try to locate this piece of code, generally at the bottom of the tpl category list file:
You should just change de part: display('list') to display('grid')
Like this:
Best regards,
Try to locate this piece of code, generally at the bottom of the tpl category list file:
- Code: Select all
view = $.cookie('display');
if (view) {
display(view);
} else {
display('list');
}
You should just change de part: display('list') to display('grid')
Like this:
- Code: Select all
view = $.cookie('display');
if (view) {
display(view);
} else {
display('grid');
}
Best regards,
-

dbassa - Posts: 229
- Joined: Mon May 18, 2009 4:11 pm
- Location: Spain
Re: Changing default view to grid
Hi there,
I done the above but it still didnt make a difference.
Still listing in list view...
Any help?
Thanks.
I done the above but it still didnt make a difference.
Still listing in list view...
Any help?
Thanks.
- Melanie
- Posts: 74
- Joined: Tue Mar 30, 2010 1:39 am
Re: Changing default view to grid
Clear your browser cookies after you done that and you should see the effect. New users to your website will see view as default 'grid'. Else if you want permanent grid layout, add this:
- Code: Select all
<script type="text/javascript">$(document).ready(function() { if(typeof display == 'function') { display('grid'); } });</script>
-

MarketInSG - Posts: 2614
- Joined: Wed Nov 16, 2011 3:53 am
- Location: Singapore
Re: Changing default view to grid
MarketInSG,
Could you explain what does exactly this script?
Thanks,
Could you explain what does exactly this script?
Thanks,
-

dbassa - Posts: 229
- Joined: Mon May 18, 2009 4:11 pm
- Location: Spain
Re: Changing default view to grid
MarketInSG wrote:Clear your browser cookies after you done that and you should see the effect. New users to your website will see view as default 'grid'. Else if you want permanent grid layout, add this:
- Code: Select all
<script type="text/javascript">$(document).ready(function() { if(typeof display == 'function') { display('grid'); } });</script>
-

MarketInSG - Posts: 2614
- Joined: Wed Nov 16, 2011 3:53 am
- Location: Singapore
Re: Changing default view to grid
I meant the javascript code. It doesn't matter. Thanks anyway.
-

dbassa - Posts: 229
- Joined: Mon May 18, 2009 4:11 pm
- Location: Spain
Re: Changing default view to grid
Hopefully somebody else can give you a better answer![img]Hopefully%20somebody%20else%20can%20give%20you%20a%20better%20answer[/img]
- jariusj77
- Posts: 4
- Joined: Thu Mar 29, 2012 1:09 am
Re: Changing default view to grid
jariusj77 wrote:Hopefully somebody else can give you a better answer![img]Hopefully%20somebody%20else%20can%20give%20you%20a%20better%20answer[/img]
Not useful comments can be kept

-

MarketInSG - Posts: 2614
- Joined: Wed Nov 16, 2011 3:53 am
- Location: Singapore
Re: Changing default view to grid
I had the same prob, wanting to have Grid by default.
I went with what dbassa instructions and it worked fine for me.
Just changed display('list'); to display('grid'); in the category TPL file, cleared my cache and presto!
All good here.
Many thanks for that tip, dbassa.
Cheers!
I went with what dbassa instructions and it worked fine for me.
Just changed display('list'); to display('grid'); in the category TPL file, cleared my cache and presto!
All good here.
Many thanks for that tip, dbassa.
Cheers!

======================================
"OpenCart . . . What a Catch! It's Marvelous!"
=======================================
"OpenCart . . . What a Catch! It's Marvelous!"
=======================================
-

opm595 - Posts: 1
- Joined: Thu Apr 19, 2012 12:27 am
- Location: Sydney, Australia
Re: Changing default view to grid
You're welcome!
-

dbassa - Posts: 229
- Joined: Mon May 18, 2009 4:11 pm
- Location: Spain
-

werepair - Posts: 110
- Joined: Sat May 28, 2011 6:54 am
- Location: United Kingdom
Re: Changing default view to grid
Can someone please tell me the path for that file?
- hellreturn
- Posts: 50
- Joined: Mon May 28, 2012 8:21 pm
Re: Changing default view to grid
tpl category list file:
catalog/view/theme/default/template/product/category.tpl
At the end of the file you will find it.
Best Regards,
catalog/view/theme/default/template/product/category.tpl
At the end of the file you will find it.
Best Regards,
-

dbassa - Posts: 229
- Joined: Mon May 18, 2009 4:11 pm
- Location: Spain
Re: Changing default view to grid
The javascript above to make the grid view permanent. Where do you place this script? I put it in the bottom of the category.tpl file and you can still choose list.
Or am I misinterpreting this? lol
Respectfully,
Len
Or am I misinterpreting this? lol
Respectfully,
Len
- lmw1
- Posts: 76
- Joined: Mon Jun 04, 2012 5:44 am
Re: Changing default view to grid
hi
I've changed the default view to grid but what happens now is that it goes back to list randomly - only sometimes, on some machines.
Could someone please point me in the right direction?
This is what i've done
f (view) {
display(view);
} else {
display('list'); ---> change to grid
}
I've changed the default view to grid but what happens now is that it goes back to list randomly - only sometimes, on some machines.
Could someone please point me in the right direction?
This is what i've done
f (view) {
display(view);
} else {
display('list'); ---> change to grid
}
- sjiitb
- Posts: 7
- Joined: Sun May 20, 2012 12:51 pm
Re: Changing default view to grid
dbassa wrote:Hello Casiefa,
Try to locate this piece of code, generally at the bottom of the tpl category list file:
- Code: Select all
view = $.cookie('display');
if (view) {
display(view);
} else {
display('list');
}
You should just change de part: display('list') to display('grid')
Like this:
- Code: Select all
view = $.cookie('display');
if (view) {
display(view);
} else {
display('grid');
}
Best regards,
Just wanted to say you star, it worked perfectly for me too! However after clicking around my website I decided I preferred the list view instead, but awesome it worked straight away so thought I would comment

-

Rosettes - Posts: 10
- Joined: Tue Feb 28, 2012 8:43 pm
Re: Changing default view to grid
dbassa help worked for me.. thanks
- SunehraTech
- Posts: 30
- Joined: Sat Jun 23, 2012 5:19 pm
Re: Changing default view to grid
@dbassa Thanks this simple change was just what I was looking for.
Life is for the taking. It's everything else you need to pay for.
AML Candles
AML Candles
-

ForgetfulGuru - Posts: 27
- Joined: Sun Jul 22, 2012 3:12 pm
- Location: Right hand corner as you enter the room, better feng shui.
30 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: Dan-fdd, pinchecl, redoctober83 and 25 guests














