Hi!
In catalog/controller/common/home.php
Change the argument to getLatestProducts() on line 21. For example change:
to
HTH
In catalog/controller/common/home.php
Change the argument to getLatestProducts() on line 21. For example change:
Code: Select all
foreach ($this->model_catalog_product->getLatestProducts(8) as $result) {
Code: Select all
foreach ($this->model_catalog_product->getLatestProducts(12) as $result) {
This worked wonderfully, thank you!Mirko wrote:Hi!
In catalog/controller/common/home.php
Change the argument to getLatestProducts() on line 21. For example change:
toCode: Select all
foreach ($this->model_catalog_product->getLatestProducts(8) as $result) {
HTHCode: Select all
foreach ($this->model_catalog_product->getLatestProducts(12) as $result) {
I would like to know if there is a code I can change to show more than 12 products on categories section too.
Thank you in advance.
I just found how to show more than 12 products in categories, maybe this will help somebody else.
In catalog/controller/product/category.php
change the arguments on those lines:
$results = $this->model_catalog_product->getProductsByCategoryId($category_id, $sort, $order, ($page - 1) * 12, 12);
$pagination->limit = 12;
to
$results = $this->model_catalog_product->getProductsByCategoryId($category_id, $sort, $order, ($page - 1) * 16, 16);
$pagination->limit = 16;
In catalog/controller/product/category.php
change the arguments on those lines:
$results = $this->model_catalog_product->getProductsByCategoryId($category_id, $sort, $order, ($page - 1) * 12, 12);
$pagination->limit = 12;
to
$results = $this->model_catalog_product->getProductsByCategoryId($category_id, $sort, $order, ($page - 1) * 16, 16);
$pagination->limit = 16;
feriyo wrote:I just found how to show more than 12 products in categories, maybe this will help somebody else.
In catalog/controller/product/category.php
change the arguments on those lines:
$results = $this->model_catalog_product->getProductsByCategoryId($category_id, $sort, $order, ($page - 1) * 12, 12);
$pagination->limit = 12;
to
$results = $this->model_catalog_product->getProductsByCategoryId($category_id, $sort, $order, ($page - 1) * 16, 16);
$pagination->limit = 16;
This was already made configurable via admin in 1.4.7 and later
Qphoria wrote:This was already made configurable via admin in 1.4.7 and later
In what section of admin is it configurable? I can't find it.
Actually, I think I found it. However, I want more than 8 latest products. The admin fix works for only categories and searches.
Try this one. You could figure it out with some php knowledge. link:http://forum.opencart.com/viewtopic.php ... art+button
I don't understand what you are saying. Right now, OpenCart lists 8 "latest" items (in the middle pane) when a person clicks on "Home". I want it to list up to 60 items. I am not using the Latest module because I don't want this information in a side column with small pictures.
I think I see what you are saying, this is how I changed mine.
I know you don't have much php experience, but it is easy to do.
Open the file catalog>controller>product>category.php and on line 116 you will see this:
The last two sets of numbers "30,30" are normally "12,12" ... so change them to what ever you want. Save the file and upload it to the path that I have shown above.
Also, if you want to change the amount shown on the main page, follow these directions.
Open the file catalog>controller>common?home.php and on line 21 you will see this:
The number in () ie: (12) was (8) and I changed mine to 12.
Have a go and good luck.
I know you don't have much php experience, but it is easy to do.
Open the file catalog>controller>product>category.php and on line 116 you will see this:
Code: Select all
$results = $this->model_catalog_product->getProductsByCategoryId($category_id, $sort, $order, ($page - 1) * 30, 30);
Also, if you want to change the amount shown on the main page, follow these directions.
Open the file catalog>controller>common?home.php and on line 21 you will see this:
Code: Select all
foreach ($this->model_catalog_product->getLatestProducts(12) as $result) {
Have a go and good luck.

You are asking for something that was answered above. I am replying to your comments about "needing" it in the admin. Once you change it to 60, you won't likely be changing it that often so you don't "need" it. It would just be nice to have in the admin to change that 1 time. All the same.. it will be there in the next version.
Qphoria, you were absolutely right -- the answer was given above. For some reason I didn't see it, or I didn't understand what I was reading. Sorry to have bothered you unnecessarily.
You are right, I don't need it as a feature in the interface (although it will be nice to have).
Thanks! It is working perfectly. Now I just need "Add to Cart" buttons in the center column, and all my problems will be solved.
You are right, I don't need it as a feature in the interface (although it will be nice to have).
Thanks! It is working perfectly. Now I just need "Add to Cart" buttons in the center column, and all my problems will be solved.
Q is aiming for the 3rd week of May.Purebeads wrote:When will 1.4.8 come out?
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
Hi all, does anyone know how to show more than 8 products in the latest Opencart version? 1.4.9.1
I can't find any new variables in the admin pages or any docs on it.
Thanks alot!
I can't find any new variables in the admin pages or any docs on it.
Thanks alot!
Ok, don't worry, I solved it. In 1.4.9.1 you have to go to catalog > controller > module and edit latest.php, the line that reads:
$results = $this->model_catalog_product->getLatestProducts($this->config->get('latest_limit'));
Where is latest_limit set?
I didn't know so I just hard coded the current max number of my products like so:
$results = $this->model_catalog_product->getLatestProducts(20);
$results = $this->model_catalog_product->getLatestProducts($this->config->get('latest_limit'));
Where is latest_limit set?
I didn't know so I just hard coded the current max number of my products like so:
$results = $this->model_catalog_product->getLatestProducts(20);
Who is online
Users browsing this forum: Bing [Bot] and 16 guests