Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Magento Products Sort by Category
 
shubhankar82718
Jr. Member
 
Total Posts:  3
Joined:  2011-12-05
 

I need to sort the product list in productCollection by Category. I need this facility because in my site i have to display New Products and Special Products in separate page(tab). I could even use addAttributetoSort() for sku,news_to_date,news_from_date,name,price etc. But could not use category_id. Its has no effect.

I know i can set it from admin panel in Manage Attribute. In Manage Attribute price,name is available to sort. Even i can create sku,news_to_date etc as attribute in from Manage Attribute. But when i create attribute code as category or category_id , it comes with an error like System reserved category/category_id. Means i could not use category or category_id as attribute from Manage Attribute(As they are reserved by the System).

Please help how to do this? I will appreciate any help.

Thanks a lot..!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Amasty
Mentor
 
Avatar
Total Posts:  3988
Joined:  2009-11-10
 

Probably you need to filter products by category, not sort.  For advanced sorting options however see Improved Sorting module.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top