Jump to content

Sort Order Change


Recommended Posts



open file:



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.

Link to comment
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
  • Create New...