This is a follow-up question to qahar's tutorial Set Category, Product n Information Spesific Template found here:
http://forum.opencart.com/viewtopic.php?f=139&t=67901
My question is this:
How can I override the default Items per Page setting for a specific category? I am running OC 1.5.3.1 and any help would be greatly appreciated. Thanks in advance.
I'm simply talking about having, say, 50 products per page for a specific category instead of the default 15 per page I have in the store's settings. This category is unique, and following qahar's tutorial I was able to format the listing uniquely, but one of the things I want to do uniquely for this category is display more items per page than the rest of the store.
Hoping that qahar will see this and offer up some insight since it was his tutorial that started me down this "specific category" path. I don't want to PM him with questions since he specifically says not to, sooo... my fingers are crossed.
Hoping that qahar will see this and offer up some insight since it was his tutorial that started me down this "specific category" path. I don't want to PM him with questions since he specifically says not to, sooo... my fingers are crossed.
Yes, then you will want to interrupt the default LIMIT with a custom number defined by you, and according to category_id. You could go crazy with it by placing a setting in the admin, or just hack it in the front end within the category control file.
For example:
Take a look at your limits array in /catalog/controller/product/category.php
Set it up there.
For example:
Take a look at your limits array in /catalog/controller/product/category.php
Code: Select all
$this->data['limits'] = array();
$this->data['limits'][] = array(
'text' => $this->config->get('config_catalog_limit'),
'value' => $this->config->get('config_catalog_limit'),
'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&limit=' . $this->config->get('config_catalog_limit'))
);
I appreciate you pointing me in the right direction, but I still don't know what I'm doing. I tried manually replacing 'config_catalog_limit' with actual integer values just to see what would happen and I did not observe any changes.
Sorry, I'm not a very experienced programmer and I'm just not sure what exactly I should be doing with all this. I do realize that in addition to overriding the items per page value, wherever that is, I'll have to make adjustments to the pagination as well, but that's about it. Any additional insight would be greatly appreciated. Once I know what actually needs replacing, I'm competent enough with vQmod and conditional statements that I should be able to make the category-specific override happen.
Sorry, I'm not a very experienced programmer and I'm just not sure what exactly I should be doing with all this. I do realize that in addition to overriding the items per page value, wherever that is, I'll have to make adjustments to the pagination as well, but that's about it. Any additional insight would be greatly appreciated. Once I know what actually needs replacing, I'm competent enough with vQmod and conditional statements that I should be able to make the category-specific override happen.
Who is online
Users browsing this forum: Majestic-12 [Bot] and 47 guests