tdr170 Posted February 3, 2012 Share Posted February 3, 2012 I am trying out the product list or grid module and need to change the products per page. The default as you probably know is 10, 20, 50 I want to change this to 12, 24, 58. When in grid mode the default of 10 leaves 2 empty slots at the bottom of each page. I know I can change the default under preferences/ products to 12 but this just adds 12 to the list 10, 12, 20, 50. I tried to search for these numbers in a number of files and was unable to find where I could change them. Thanks in advance for your help. Link to comment Share on other sites More sharing options...
_matis_ Posted February 3, 2012 Share Posted February 3, 2012 you can find it in classes/FrontController.php, function pagination 2 Link to comment Share on other sites More sharing options...
tdr170 Posted February 3, 2012 Author Share Posted February 3, 2012 Thanks: Just what I needed I would never have found that there. Link to comment Share on other sites More sharing options...
juanv Posted May 17, 2012 Share Posted May 17, 2012 Thanks: Just what I needed I would never have found that there. you can find it in classes/FrontController.php, function pagination Hi I found the default products per page, 10, 20 or 50 but cant seem to change them to : 9, 18 or 36 If iam not mistaken one should change the numbers here : public function pagination($nbProducts = 10) { if (!self::$initialized) $this->init(); $nArray = (int)(Configuration::get('PS_PRODUCTS_PER_PAGE')) != 10 ? array((int)(Configuration::get('PS_PRODUCTS_PER_PAGE')), 10, 20, 50) : array(10, 20, 50); // Clean duplicate values $nArray = array_unique($nArray); asort($nArray); $this->n = abs((int)(Tools::getValue('n', ((isset(self::$cookie->nb_item_per_page) AND self::$cookie->nb_item_per_page >= 10) ? self::$cookie->nb_item_per_page : (int)(Configuration::get('PS_PRODUCTS_PER_PAGE')))))); $this->p = abs((int)(Tools::getValue('p', 1))); Once changed the default landing page is still on 10, with options to choose from being 9, 10 or 18. I want the default landing page to be 9, what am i missing ?? Link to comment Share on other sites More sharing options...
tdr170 Posted May 17, 2012 Author Share Posted May 17, 2012 After making changes you need to turn force compile on and cache off under preferences. Also you will need to change the default products per page to your first number (9) under preferences products. 1 Link to comment Share on other sites More sharing options...
juanv Posted May 17, 2012 Share Posted May 17, 2012 After making changes you need to turn force compile on and cache off under preferences. Also you will need to change the default products per page to your first number (9) under preferences products. I never changed it in the BO , thank you for the help!!! Link to comment Share on other sites More sharing options...
Ueshi28 Posted October 11, 2012 Share Posted October 11, 2012 Hello, I edited everything as described, I turned chache off (it was already off) and turned force compile on. But still not working. Any advice? Thank you Link to comment Share on other sites More sharing options...
valentin.g Posted October 11, 2012 Share Posted October 11, 2012 in your theme path edit file pagination.tpl and change code below: {if (int)(Configuration::get('PS_PRODUCTS_PER_PAGE')) != 10} {assign var='nArray' value=array((int)(Configuration::get('PS_PRODUCTS_PER_PAGE')), 24, 58)} {else} {assign var='nArray' value=array(15, 30, 60)} {/if} 1 Link to comment Share on other sites More sharing options...
Ueshi28 Posted October 12, 2012 Share Posted October 12, 2012 Thank you Valentin! (I think you made the job on my website farmamela) Link to comment Share on other sites More sharing options...
Ueshi28 Posted October 12, 2012 Share Posted October 12, 2012 (edited) I tried to change the value 58 with 48 but it seems nothing happens. As it should be 12 - 24 - 48, otherwise there are 2 empty spaces on the last line of course. SOLVED (I needed to turn force compile on) Edited October 12, 2012 by Ueshi28 (see edit history) Link to comment Share on other sites More sharing options...
valentin.g Posted October 12, 2012 Share Posted October 12, 2012 Thank you Valentin! (I think you made the job on my website farmamela) hi, you are right Link to comment Share on other sites More sharing options...
PrestaFanBoy Posted August 28, 2013 Share Posted August 28, 2013 After making changes you need to turn force compile on and cache off under preferences. Also you will need to change the default products per page to your first number (9) under preferences products. Thank you Tdr170. Your suggestion worked for me. Did a like Thanks for every suggestion on this topic. PrestaFanBoy Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now