I need to list products in a category page sorted by subcategory with respective subcategory name before the products. With static blocks I can display the name of the subcategory on the category page but I cannot list the products. Any pointers?

  • You need to do custom code for this, used any .phtml file and in that do code according to your requirement. – Dhiren Vasoya Nov 16 '17 at 13:46

Without touching the code. I have created a static block where I entered all my subcategories as follows with respective headings:

    {{block type="catalog/product_list" category_id="ID_OF_SUBCATEGORY" 
    template="catalog/product/list.phtml" column_count="3" 

Then I went to my category and in display settings: Display mode => Products only and CMS Block => the name of my new cms block.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.