Now you can easily add a page with new arrivals to your Magento store using Shop by Special Price, Catalog Price Rules, New Arrivals, Attribute Option extension. Here is how:
- Create a CMS page on which you will place a list of products with special prices. Fill in the fields as usual.
- Add the following layout instructions to Design tab->Page Layout->Layout Update XML.
If you use original Magento Layered Navigation:
<reference name="content">
<!-- this block when present on page removes all non-new products -->
<block type="manapro_productcollections/new" name="product_filter">
<action method="setCategoryId"><category_id>3</category_id></action>
</block>
<!-- add category products to content column -->
<block type="catalog/product_list" name="product_list" after="product_filter"
template="catalog/product/list.phtml">
<action method="setCategoryId"><category_id>3</category_id></action>
<block type="core/text_list" name="product_list.name.after" as="name.after" />
<block type="core/text_list" name="product_list.after" as="after" />
<block type="catalog/product_list_toolbar" name="product_list_toolbar"
template="catalog/product/list/toolbar.phtml">
<block type="page/html_pager" name="product_list_toolbar_pager"/>
</block>
<action method="addColumnCountLayoutDepend"><layout>empty</layout>
<count>6</count>
</action>
<action method="addColumnCountLayoutDepend">
<layout>one_column</layout>
<count>5</count>
</action>
<action method="addColumnCountLayoutDepend">
<layout>two_columns_left</layout>
<count>4</count>
</action>
<action method="addColumnCountLayoutDepend">
<layout>two_columns_right</layout>
<count>4</count>
</action>
<action method="addColumnCountLayoutDepend">
<layout>three_columns</layout>
<count>3</count>
</action>
<action method="setToolbarBlockName">
<name>product_list_toolbar</name>
</action>
</block>
</reference>
<!-- add layered navigation to left column -->
<reference name="left">
<block type="catalog/layer_view" name="catalog.leftnav" before="-"
template="catalog/layer/view.phtml" />
</reference>
If you use SEO Layered Navigation plus:
<update handle="cms_page_layered" />
<!-- add category products to content column -->
<reference name="cms.products">
<block type="catalog/product_list" name="product_list"
template="catalog/product/list.phtml">
<action method="setCategoryId"><category_id>3</category_id></action>
<block type="core/text_list" name="product_list.name.after" as="name.after" />
<block type="core/text_list" name="product_list.after" as="after" />
<block type="catalog/product_list_toolbar" name="product_list_toolbar"
template="catalog/product/list/toolbar.phtml">
<block type="page/html_pager" name="product_list_toolbar_pager"/>
</block>
<action method="addColumnCountLayoutDepend">
<layout>empty</layout>
<count>6</count>
</action>
<action method="addColumnCountLayoutDepend">
<layout>one_column</layout>
<count>5</count>
</action>
<action method="addColumnCountLayoutDepend">
<layout>two_columns_left</layout>
<count>4</count>
</action>
<action method="addColumnCountLayoutDepend">
<layout>two_columns_right</layout>
<count>4</count>
</action>
<action method="addColumnCountLayoutDepend">
<layout>three_columns</layout>
<count>3</count>
</action>
<action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
</block>
</reference>
<reference name="before_body_end">
<block type="mana_filters/layer" name="mana_layer" as="mana_layer" before="-">
<action method="setCategoryId"><category_id>3</category_id></action>
</block>
<!-- this block when present on page removes all non-new products -->
<block type="manapro_productcollections/new" name="product_filter">
<action method="setCategoryId"><category_id>3</category_id></action>
</block>
</reference>
Notes:
- All XML instructions above adds product list to content area of the page, layered navigation block to left column and remove all products with regular products from the list.
- Make sure 2 column layout is selected in Design tab->Page Layout->Layout. In case you prefer right column instead of left column, change <reference name="left"> to <reference name="right">. If you do not need layered navigation remove <reference name="left"> ... </reference>.
- Also insert ID of root category in <category_id>3</category_id> (2 times).
- Open root category of your store through Catalog->Manage Categories. Make sure that Is Anchor=Yes on Display Settings tab (only needed if you want layered navigation to work).
In case you use our layered navigation extension from SEO Layered Navigation Plus series, you may also specify any category ID - in this case additional category filter will be applied. You still have to make sure that specified category is set to Is Anchor = Yes.
You can also easily apply special price filter, new product filter and custom attribute filter on one page. Below is an example of new red products. Please note that instead of one block named "product_filter" (in XML above it is in bold) you should insert 2 blocks and name them "product_filter1" and "product_filter2":
<block type="manapro_productcollections/new" name="product_filter1">
<action method="setCategoryId"><category_id>3</category_id></action>
</block>
<block type="manapro_productcollections/filtered" name="product_filter2">
<action method="setCategoryId"><category_id>3</category_id></action>
<action method="addFilter">
<attribute_code>color</attribute_code>
<option>Red</option>
</action>
</block>
You can add all products created during last X days by adding the following line (in bold).
<block type="manapro_productcollections/new" name="product_filter">
<action method="setCategoryId"><category_id>3</category_id></action>
<action method="setDaysProductsAreNew"><value>30</value></action>
<block type="manapro_productcollections/new" name="product_filter">
<action method="setCategoryId"><category_id>3</category_id></action>
<action method="setDaysProductsAreNew"><value>30</value></action>
<action method="setIgnoreNewProducts"><value>1</value></action>
absolutex
posted on Wednesday, January 23, 2013 9:03:01 AM Europe/Vilnius