In one of our projects, the requirement was to have a different layout for some category pages. So, we decided to use a different template file for these categories. We added the following code in the “Custom Layout Update” field for these categories in admin.
<reference name="category.products"> <action method="setTemplate"> <template>catalog/category/custom-category.phtml</template> </action> </reference>
These category pages need to show the products in a different layout.
There might have been a situation when you would have created a special category like “Sale Products” or “Featured Products”… and you had wanted to display products from these categories on some page like Home Pages using the CMS static block.
In order to achieve this you may create a CMS static block and add the following segment of code:
{{block type="catalog/product_list" name="product_list" category_id="2" column_count="4" template="catalog/product/list.phtml" }}
This will display the products listing page as a block on the page.
In Magento you can change the default sorting attribute for product listing page from Magento admin.
To set the sorting attribute login to Magento admin and follow the following steps:
1. Go to Admin >> System >> Configuration >> Catalog
2. Expand the “Frontend” Section
3. Make selection from the “Product Listing Sort by” dropdown
4. Click the “Save Config” button.
In order to promote certain products, you may want to place them at the top in the category product listing page. Lets see how to set/change the position of the products from Magento admin.
To set/change the position of the products proceed as below:
1. Login Magento admin and follow the path Admin >> Catalog >> Manage Categories.
2. Click on a category in the category tree to display the category related information.