Mister Denial Posted June 8, 2012 Share Posted June 8, 2012 Hello, is there a way to limit the number of displayed items in the default "same category" module that comes with PS 1.4? Having categories with many items creates a considerable number of links on the page, which according to Google Webmaster tools is a no-no. Any ideas or recommendations? Your help is much appreciated. Kindly, Dan Link to comment Share on other sites More sharing options...
Mike Kranzler Posted June 8, 2012 Share Posted June 8, 2012 Hi Dan, In your modules/productscategory/productscategory.php, change the value from 100 to whatever you would prefer in this line: $categoryProducts = $category->getProducts((int)($cookie->id_lang), 1, 100); /* 100 products max. */ Please let me know if that works for you. -Mike Link to comment Share on other sites More sharing options...
Mister Denial Posted June 8, 2012 Author Share Posted June 8, 2012 Hi Mike, thanks for your incredibly fast reply, I'll give it a try. Do you happen to know how the items are selected, i.e. by date added, alphabetically, etc... ? Thanks! Dan Link to comment Share on other sites More sharing options...
Mike Kranzler Posted June 8, 2012 Share Posted June 8, 2012 Hi Mike, thanks for your incredibly fast reply, I'll give it a try. Do you happen to know how the items are selected, i.e. by date added, alphabetically, etc... ? Thanks! Dan I don't know that off the top of my head, but give my suggestion a try and let me know if that works for you! -Mike Link to comment Share on other sites More sharing options...
Mister Denial Posted June 8, 2012 Author Share Posted June 8, 2012 Hi Mike, this works perfectly, BUT I still have a question: is it possible to make it so it sorts by the newest items first from the same category only? Like for example, limit this module to show the 5 latest items from the same category? Currently it looks like it shows the items chronologically, as added. Thanks again for your help! Dan Link to comment Share on other sites More sharing options...
Mike Kranzler Posted June 8, 2012 Share Posted June 8, 2012 Hi Mike, this works perfectly, BUT I still have a question: is it possible to make it so it sorts by the newest items first from the same category only? Like for example, limit this module to show the 5 latest items from the same category? Currently it looks like it shows the items chronologically, as added. Thanks again for your help! Dan Hi Dan, It's certainly possible, I just couldn't give you a code suggestion off the top of my head. Since that is a separate topic from this one, I'm going to go ahead and mark this as solved per the rules of the PrestaShop forums, but please feel free to create a new thread to get help on that question as well. Happy selling! -Mike Link to comment Share on other sites More sharing options...
Mister Denial Posted June 8, 2012 Author Share Posted June 8, 2012 Thanks Mike, I will open a new thread. Should you miraculously happen to think of a solution, the new thread will be on in a couple of minutes. ;-) Have a good one! Dan 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