Jump to content

a better pagination


kingbbq
 Share

Recommended Posts

Hi all,

even it's my first website i'm making using prestashop, i'm an experienced PHP hard-coder.

i hope it's not an allready known issue but i would like to introduce a little hack to the pagination system, very useful if your default number of products per page looks like 12, 16, 15 or still 10.

In pagination.php

$nArray = intval(Configuration::get('PS_PRODUCTS_PER_PAGE')) != 10 ? array(intval(Configuration::get('PS_PRODUCTS_PER_PAGE')), 10, 20, 50) : array(10, 20, 50);
asort($nArray);



becomes

$hack_products_per_page = intval(Configuration::get('PS_PRODUCTS_PER_PAGE'));
$nArray = array($hack_products_per_page, $hack_products_per_page * 2, $hack_products_per_page * 5);



In my mind it will be great to see this included for every one.
Making this hack, correct me if i'm wrong, u may alter the pagination.tpl by line 48

//{if $nb_products > 10}
{if $nb_products > $n}




Thanks for appreciate. As i'm french, i gonna send this to our dedicated forum.
Peace

Share this post


Link to post
Share on other sites

  • 2 months later...

Howdy,

Is there a way to have different paginations for products and manufacturers? I want to display all manufacturers on the manufacturers page, but it seems I don't know how to do it, it has the same pagination like the products.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More