Is it possible to sort by A the position and then B these products alphabetically shown.
I have new products and sale products coming into a category and they show all the new ones first then all the sale ones.
But I need to sort this by name.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In admin
Go to Manage Categories, select the category, then on it’s products tab give each one a position number. They will be sorted according to that order.
Programmatically
You can do this by calling a product collection’s
addAttributeToSortmethod for each ordering.For example, wherever you see in a template,
$_category->getProductCollection()or$_product->getCollection()you can then add->addAttributeToSort('position')->addAttributeToSort('name')immediately after it.addAttributeToSort()also takes a direction as a second parameter so you can have eitheraddAttributeToSort('name', 'asc')oraddAttributeToSort('name', 'desc').