Post by DWWD » Wed Feb 04, 2009 7:22 pm

Hi,

Would I be right in assuming that this (config_max_rows) controls the maximum number of products displayed on all pages, such as home (latest products), search, categories etc.?

As such if I need to change this number on any one page I would need to do the following (I'll use home to display 6 of the latest products):

In catalog/controller/home.php change:

Code: Select all

$results = $database->getRows("select * from product p left join product_description pd on (p.product_id = pd.product_id) left join image i on (p.image_id = i.image_id)
where p.status = '1' and pd.language_id = '".(int)$language->getId()."' and p.date_available <= now() and p.status = '1' 
order by p.date_added desc limit ".$config->get('config_[color=blue]max[/color]_rows'));
to:

Code: Select all

$results = $database->getRows("select * from product p left join product_description pd on (p.product_id = pd.product_id) left join image i on (p.image_id = i.image_id)
where p.status = '1' and pd.language_id = '".(int)$language->getId()."' and p.date_available <= now() and p.status = '1' 
order by p.date_added desc limit ".$config->get('config_[color=red]home[/color]_rows'));
Then run:

Code: Select all

INSERT INTO `setting` (`setting_id`, `type`, `group`, `key`, `value`) VALUES (NULL, 'catalog', 'config', 'config_[color=red]home[/color]_rows', '[color=red]6[/color]');

Our extensions: Royal Mail Shipping API; Copy Coupon; Checkout Address Formats
Our OpenCart store: Delves Wood Bears


User avatar
New member

Posts

Joined
Fri Nov 14, 2008 9:58 pm
Location - Moulton, Spalding

Post by Qphoria » Wed Feb 04, 2009 7:43 pm

actually the config_max_rows applies to pages that have lists and pagination like categories and such. The home page config as you can see in your last bit of code is hardcoded to "6". You can change that number there.

In 0.8, that whole section has been reconfigured to use the admin for configuration and no more static values.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by DWWD » Wed Feb 04, 2009 7:54 pm

Thanks. The '6' (for config_home_rows) was a change from config_max_rows which was '9'.

Does make sense to have this controlled from within Admin, then a shop owner can change it themselves, rather than having to get someone to change it for them.

When's 0.8 scheduled for release?

Our extensions: Royal Mail Shipping API; Copy Coupon; Checkout Address Formats
Our OpenCart store: Delves Wood Bears


User avatar
New member

Posts

Joined
Fri Nov 14, 2008 9:58 pm
Location - Moulton, Spalding

Post by Qphoria » Wed Feb 04, 2009 8:19 pm

! 0.7.9 final just came out! Give us some time :)

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by DWWD » Wed Feb 04, 2009 8:56 pm

I know, I'm working on 0.7.9!

I've only just started using OpenCart, so wasn't sure what the "normal" gap between new releases was...
(I've seen enough varying strategies over the years to know it's not such a silly question)  ;)

Our extensions: Royal Mail Shipping API; Copy Coupon; Checkout Address Formats
Our OpenCart store: Delves Wood Bears


User avatar
New member

Posts

Joined
Fri Nov 14, 2008 9:58 pm
Location - Moulton, Spalding

Post by hm2k » Wed Feb 04, 2009 10:47 pm


UK Web Hosting


User avatar
Global Moderator

Posts

Joined
Tue Mar 11, 2008 9:06 am
Location - UK

Post by DWWD » Wed Feb 04, 2009 11:15 pm

Thanks for the pointer...

Our extensions: Royal Mail Shipping API; Copy Coupon; Checkout Address Formats
Our OpenCart store: Delves Wood Bears


User avatar
New member

Posts

Joined
Fri Nov 14, 2008 9:58 pm
Location - Moulton, Spalding
Who is online

Users browsing this forum: No registered users and 12 guests