Post by gerrynoble » Sun Apr 26, 2009 2:46 am

Where can I change the limit of products displayed via pagination - the default setting is 12 - but can't find out where to change this.

Also

Is there a clear set of systems documentation to follow for amending opencart?

Newbie

Posts

Joined
Sun Apr 26, 2009 2:42 am

Post by make-oc » Tue Apr 28, 2009 10:55 am

No simple answer to this one…

Do search for limit in your code and you'll find various files and places — sorry, I was looking into this for the backend, so I can't give a better answer.

Also, it may depend on several lines of code! In my case (backend 1.2.6) it was
/admin/controller/catalog/product.php
line 214

Code: Select all

        $data = array(
            'name'     => @$this->request->get['filter_name'],
            'model'     => @$this->request->get['filter_model'],
            'status' => @$this->request->get['filter_status'],
            'sort'   => $sort,
            'order'  => $order,
            ### AdminSection - Setting for pagination
            #'start'  => ($page - 1) * 10,
            'start'  => ($page - 1) * 50,
            #'limit'  => 10
            'limit'  => 50
        );
and line 320

Code: Select all

        ### AdminSection - Setting for pagination
        $pagination = new Pagination();
        $pagination->total = $product_total;
        $pagination->page = $page;
        $pagination->limit = 50;
I add my own coments, so I can finde my changes to the code
Hope this will get you started ;-)

Cheers

New member

Posts

Joined
Tue Apr 07, 2009 2:17 pm

Post by gerrynoble » Wed Apr 29, 2009 8:27 pm

Thanks for the info.

Have changed this value - but does not seem to affect the number of products displayed.

Anyone else help?

Newbie

Posts

Joined
Sun Apr 26, 2009 2:42 am

Post by make-oc » Thu Apr 30, 2009 7:14 am

Read my post again…
I was looking into this for the backend; (backend 1.2.6); ### AdminSection…
do indicate it's not what you're looking for ;-)

Do search for limit in your code and try finding it for the frontend

New member

Posts

Joined
Tue Apr 07, 2009 2:17 pm

Post by smorelli » Thu Feb 25, 2010 11:39 pm

Strange. I have tried this for the admin/ Sales/Customer List and it didn't change anything. Strange indeed. This is coming from the controller page customer.php, right?

New member

Posts

Joined
Wed Jan 27, 2010 6:28 am

Post by boriscm » Fri Feb 26, 2010 6:10 am

If u want to change the limit on the fronted for example in category.tpl

your answer is here : http://forum.opencart.com/viewtopic.php ... +12#p42205

Greetings
boriscm

New member

Posts

Joined
Fri Feb 12, 2010 6:23 pm

Post by smorelli » Sat Feb 27, 2010 1:01 am

I'm specifically wanting the backend. I hate having to page through tens of thousands of products or customers.

New member

Posts

Joined
Wed Jan 27, 2010 6:28 am

Post by rph » Sat Feb 27, 2010 3:01 am

smorelli wrote:Strange. I have tried this for the admin/ Sales/Customer List and it didn't change anything. Strange indeed.
That's because the code is for products, not the customer list. Make the same changes to

/admin/controller/customer/customer.php

to achieve the same result.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by smorelli » Sat Feb 27, 2010 4:12 am

That's because the code is for products, not the customer list. Make the same changes to

/admin/controller/customer/customer.php

to achieve the same result.
Forgot to mention I already did that and still got no results. I did find what I was looking for. It was in /admin/controller/sale/customer/customer.php instead.

Thanks!

New member

Posts

Joined
Wed Jan 27, 2010 6:28 am
Who is online

Users browsing this forum: No registered users and 324 guests