Opencart Grid View by Default

Post 22 of 74

Opencart Grid View by Default

This is a tutorial or how to guide to help you make OpenCart 1.5 display the grid view by Default.

This is really really simple and easy to do, and why there’s no option in the OpenCart Admin Area to specify this is beyond me, however.
Open > your themes folder > template > common > footer.tpl

And then before </body>

Add this code:

<script type="text/javascript">$(document).ready(function() { display('grid'); });</script>

And that’s it – you’re done!

Enjoy :)

, , ,

16 comments:

EdgarJanuary 7, 2012 at 12:45 amReply

Good job, simple and efficient, thank you. Works fantastic.

ThemeGrrlJanuary 24, 2012 at 3:08 amReply

Great solution, thank you!

JohnnyJanuary 25, 2012 at 4:10 amReply

Hi,

While Googling also found this regarding the above:
http://forum.opencart.com/viewtopic.php?t=33075

DanteFebruary 9, 2012 at 1:53 pmReply

in oc 1.5.1.3 find this code:

if (view) {
display(view);
} else {
display(‘list’);
}

at the bottom of the template of your interest, and change it to

if (view) {
display(view);
} else {
display(‘grid’);
}

i find that’s a better way to modify oc default view.
Bye bye

Salman KeralaApril 16, 2012 at 4:15 pmReply

Thanks very much, my client always asking for changing the default view to grid, now it’s ok ,,, working fine…. Thanks

JanineApril 17, 2012 at 12:04 pmReply

Works perfectly and much easier than some of the other methods I have seen! Thank you for sharing!

ตั้งค่าให้ opencart แสดงสินค้าค้าแบบ Grid ตลอดเวลา | Smokietor PHP BlogJune 27, 2012 at 11:36 pmReply

[...] จาก http://www.itsadam.co.uk/opencart-grid-view-by-default/ This entry was posted in Opencart. Bookmark the permalink. ← CR2 HTML Module โมดูลสำหรับใส่ HTML ใน Opencart [...]

NickJuly 6, 2012 at 11:02 amReply

Great fix, thanks :) Can’t believe it was that easy to change, and that there isn’t an option in the admin panel for that..

Nick

KarinOctober 15, 2012 at 7:12 pmReply

Thanks, works great in 1.5.4.1. The other solutions I’ve found did nothing.

KazeDecember 2, 2012 at 2:34 pmReply

thx a lot for ur great solution, now i can change from List to Grid :D

Muhammad NaveedJanuary 6, 2013 at 4:11 pmReply

Excellent work, Thanks

IffiFebruary 12, 2013 at 7:41 pmReply

FanTasTic dearu Great Work ….. jeanius ahan :)

DavidFebruary 14, 2013 at 3:17 amReply

Thanks

indra muliaMarch 13, 2013 at 3:50 amReply

YESS… It works.
Thank you for helpfull sharing. :)

Mirza BaigJune 27, 2013 at 6:50 pmReply

Wow that was easy solution worked fine for my requirement!
Thanks a lot

KonstantinSeptember 9, 2013 at 8:19 pmReply

Thank you man.
Works perfect in 1.5.5.1

Menu