monova Posted May 29, 2014 Share Posted May 29, 2014 Hi there, I'm working on www.shapemanagement.ro and I have a problem. I want my homefeatured module to display my "products" in alphabetical order. Does anyone know how to do this? Using PS 1.5.6.2 Thanks Link to comment Share on other sites More sharing options...
csschopper.com Posted May 29, 2014 Share Posted May 29, 2014 Hi, You can do it in 2 manners. 1. Change the query for fetching featured product & add order by name (you need to overwride the file). 2. You can sort the result array by product name. Thanks Alok 1 Link to comment Share on other sites More sharing options...
monova Posted May 29, 2014 Author Share Posted May 29, 2014 Thank you Alok, Could you give more details on one of the fixes recommended by you? Link to comment Share on other sites More sharing options...
vekia Posted May 29, 2014 Share Posted May 29, 2014 open file: /modules/homefeatured/homefeatured.php there is a code like: $category->getProducts((int)Context::getContext()->language->id, 1, ($nb ? $nb : 8), "position"); change "position" to "name", and add orderWay param where you can define method of sort "ASC - ascending or DESC - descending" $category->getProducts((int)Context::getContext()->language->id, 1, ($nb ? $nb : 8), "name", "ASC"); 2 Link to comment Share on other sites More sharing options...
monova Posted May 29, 2014 Author Share Posted May 29, 2014 Thank you! ..i guess some things can be done in less than 10 seconds Link to comment Share on other sites More sharing options...
pxloft Posted February 8, 2015 Share Posted February 8, 2015 (edited) open file: /modules/homefeatured/homefeatured.php there is a code like: $category->getProducts((int)Context::getContext()->language->id, 1, ($nb ? $nb : 8), "position"); change "position" to "name", and add orderWay param where you can define method of sort "ASC - ascending or DESC - descending" $category->getProducts((int)Context::getContext()->language->id, 1, ($nb ? $nb : 8), "name", "ASC"); How do you deal with numbers?? I have a list of Album Highlights on my store (i.e.: Album 1, Album, 2, Album 3, Album 4, Album 5, Album 6, Album 7, Album 8, Album 9, Album 10) When I get to 10 is when the issue starts (Album 10 goes next to Album 1)... but and the same with (Album 20 next to Album 2). I have a picture of the result. How do I fix this?? Please help. Edited February 8, 2015 by pxloft (see edit history) 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