Page 1 of 1
How to set products in a grid by default OC 2.2.0.0
Posted: Thu Sep 15, 2016 6:21 pm
by X-Bumble
Hi there.
I'm running Opencart 2.2.0.0. When I click the page which shows me all of the products, I can see the buttons that allow me to view the products either in a list or in a grid.
My client wants that functionality hidden, but he always wants the products to be shown in the grid format.
Is there any way I can set this?
Many thanks
Re: How to set products in a grid by default
Posted: Thu Sep 15, 2016 7:04 pm
by IP_CAM
Re: How to set products in a grid by default
Posted: Fri Sep 16, 2016 4:40 pm
by X-Bumble
All of the extensions were for 1.5, but I re-wrote the PHP code and sorted it out myself.
For anyone who wants to know...
Open up: \opencfiles\catalog\view\theme\*your-template-name-goes-here*\template\product\category.tpl
Find line: <div class="product-layout product-list col-xs-12"> (it is line 80 on my editor)
and change it to: <div class="product-layout product-grid col-lg-3 col-md-3 col-sm-6 col-xs-12">
Re: How to set products in a grid by default OC 2.2.0.0
Posted: Fri Sep 16, 2016 5:55 pm
by IP_CAM
well, they both seem to function, as it looks, in OC v.2.2:
---
Hide grid/list buttons
http://www.opencart.com/index.php?route ... n_id=23218
--
Grid View by Default
http://www.opencart.com/index.php?route ... n_id=19648
---
Good Luck
Ernie
Re: How to set products in a grid by default OC 2.2.0.0
Posted: Fri Sep 16, 2016 9:39 pm
by X-Bumble
Well no matter as if anyone does what I suggested above it will do the trick. May save someone a few dollars as well
Thanks for all your help by the way.
Re: How to set products in a grid by default OC 2.2.0.0
Posted: Fri Sep 16, 2016 10:13 pm
by IP_CAM
Well done! I just checked in my OC-2 Theme, driven by my OC v.1.5.6.5 Engine, and compared your Solution:
Code: Select all
<div class="product-layout product-grid col-lg-3 col-md-3 col-sm-6 col-xs-12">
with the one, I have created for this:
Code: Select all
<div class="product-layout product-grid col-lg-4 col-md-4 col-sm-6 col-xs-12">
so, I have only 3 Product per Row, because I feel, it looks better, if one displays the Side Panel Category Box.
Just to let you know !
Good Luck !
Ernie
To be seen momentarely here:
http://www.gratis-anzeiger.com/