noesac Posted October 16, 2010 Share Posted October 16, 2010 I've set my categories to display 27 products, however it is only displaying 20...but the worst part is, the pagination () isn't visible until you change the drop-down menu: 10 > 20. http://tiny.cc/9ljzjAnyone know what could be wrong? Link to comment Share on other sites More sharing options...
rocky Posted October 17, 2010 Share Posted October 17, 2010 It looks like you've messed up the pagination values. You've only got "12" as the available pagination option and it looks like you have the default number of products per page on the Preferences tab set to something different. What do you have one line 3 of pagination.php? Here's what I have: $nArray = intval(Configuration::get('PS_PRODUCTS_PER_PAGE')) != 10 ? array(intval(Configuration::get('PS_PRODUCTS_PER_PAGE')), 10, 20, 50) : array(10, 20, 50); Link to comment Share on other sites More sharing options...
noesac Posted October 17, 2010 Author Share Posted October 17, 2010 Hi Rocky, It was exactly like your code about an hour ago (I had never changed it) but I just updated the values as follows in an attempt to fix this: $nArray = intval(Configuration::get('PS_PRODUCTS_PER_PAGE')) != 12 ? array(intval(Configuration::get('PS_PRODUCTS_PER_PAGE')), 12, 24, 48) : array(12, 24, 48); It seems to have fixed the page above, but now I noticed another page is affected: http://tiny.cc/3fupxAs you can see, there's nothing in the drop-down at all! Link to comment Share on other sites More sharing options...
rocky Posted October 17, 2010 Share Posted October 17, 2010 Since you've changed the lowest value from 10 to 12, you need to change line 48 of pagination.tpl from: {if $nb_products > 10} to: {if $nb_products > 12} Link to comment Share on other sites More sharing options...
noesac Posted October 17, 2010 Author Share Posted October 17, 2010 Thanks Rocky. Would you have expected my change to have fixed my original problem? I just want to make sure I'm not applying some sort of a hack here:) Link to comment Share on other sites More sharing options...
rocky Posted October 17, 2010 Share Posted October 17, 2010 Yes, I expect this will fix all your pagination problems. It was simply a consistency problem. You changed a value in one place and forgot to change it in another. I did notice that in the "iPhone 4 Cases" category, you have 12, 24, 27, 48 as the options. It looks like you've got the number of products per page on the Preferences tab set to 27. You should change it to 12 or any of the other values in the dropdown box to prevent a new entry being added. Link to comment Share on other sites More sharing options...
noesac Posted October 17, 2010 Author Share Posted October 17, 2010 Hi Rocky, i'm a little confused about how this works. What i'm trying to do is display more products in the categories page (hence switching it from 12 to 27). If I change it to 12 (which is less than what I would like anyway) what if there are less than 12 products in the category? Link to comment Share on other sites More sharing options...
rocky Posted October 17, 2010 Share Posted October 17, 2010 If a category has less than 12 products, then the pagination dropdown won't be displayed at all. 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