Written by me@grafxflow
27 Sep, 2012
0
3,109
The problem I had was to change the number of products on each row on the search results page from 4 to 3.
I was also using version 1.4.9.3 of OpenCart and I couldn't find a way via the admin, but after searching I managed to solve the problem by changing some code instead.
The page can be found in either
catalog/view/theme/default/template/product/search.tpl
or
catalog/view/theme/[your_theme_name]/template/product/search.tpl
Then find the following segment of code.
<table class="list">
<?php for ($i = 0; $i < sizeof($products); $i = $i + 4) { ? >
<tr>
<?php for ($j = $i; $j < ($i + 4); $j++) { ? >
and change it to the new number in both places
<table class="list">
<?php for ($i = 0; $i < sizeof($products); $i = $i + 3) { ? >
<tr>
<?php for ($j = $i; $j < ($i + 3); $j++) { ? >
01 Jan, 2013
24 Nov, 2013
07 Nov, 2012
I am a Full-stack Developer who also started delving into the world of UX/UI Design a few years back. I blog and tweet to hopefully share a little bit of knowledge that can help others around the web. Thanks for stopping by!
Follow11 Jul, 2023
21 Jun, 2023
Views: 166,586
Views: 40,466
Views: 37,234
Views: 33,736