Magento, custom product list

偶尔善良 提交于 2019-12-03 08:20:51

You need to add the Block that renders the Layers into the left column.

If you look in catalog.xml, you will see that the catalog_category_layered node includes the following:

<reference name="left">
        <block type="catalog/layer_view" name="catalog.leftnav" after="currency" template="catalog/layer/view.phtml"/>
        ...
</reference>

So, add that into your CMS xml layout update and that should display the Layer block on your CMS page.

If you have issues with the product list not being filtered when you click one of the filterable attributes, that is probably because the links rendered by the Layer_View Block assume that they are going to post back to a CategoryController, not a CmsController which will be rendering your CMS page. That may or may not be an issue, so report back here if it doesn't work and we can try to work through it.

Personally I would have a hidden category with all products in it and use a script to keep that updated to be all products. The script can be done with the API, slow yes, but it will work in a timely fashion for a certain level of SKU count.

layer navigation is include in category view. You should include the part of navigation used by category, so try to insert

        <reference name="left">
        <block type="catalog/navigation" name="catalog.leftnav" after="currency" template="catalog/navigation/left.phtml"/>
    </reference>

before

<reference name="content">

I'm not sure but if it's doesn't works it should help you to understand the problem anyway

check the following pages ( they came across the same problem )

http://www.exploremagento.com/magento/some-custom-blocks-to-help-you-show-products.php http://www.chilipepperdesign.com/2009/03/23/magento-how-to-list-all-the-products-in-a-single-category-in-a-sidebar-block

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!