Magento:上次查看的产品仅显示父类别

时间:2012-09-11 07:09:00

标签: xml magento catalog magento-1.7

我们建立了一个葡萄酒网上商店:http://www.christianwinecellars.com/nl/assortiment/ 问题是,最后查看的产品只出现在具有子类别的类别的右栏中。 因此,当您查看产品时,会出现在法国的/ assortiment / en。

这是在local.xml中完成的方式

<catalog_category_layered>
    <update handle="page_two_columns_left" />

    <reference name="right">
        <action method="unsetChild"><name>right.reports.product.viewed</name></action>
    </reference>

    <reference name="left">
        <action method="unsetChild"><name>currency</name></action>
        <action method="unsetChild"><name>catalog.leftnav</name></action>
        <block type="catalog/layer_view" name="catalog.leftnav" after="currency" template="catalog/layer/view.phtml"/>
        <block type="reports/product_viewed" name="right.reports.product.viewed" template="reports/product_viewed.phtml" />
    </reference>
</catalog_category_layered>

有谁知道为什么这不会出现在每个类别? Al类别是分层的(是锚点)。

1 个答案:

答案 0 :(得分:1)

我从使用Magento 1.7的标签中了解到......根据:app/design/frontend/base/default/layout/reports.xml

<layout version="0.1.0">
    <default>
        <!-- Mage_Reports -->
        <reference name="right">
            <block type="reports/product_viewed" before="right.permanent.callout" name="right.reports.product.viewed" template="reports/product_viewed.phtml" />
            <block type="reports/product_compared" before="right.permanent.callout" name="right.reports.product.compared" template="reports/product_compared.phtml" />
        </reference>
    </default>

    <catalog_category_layered_nochildren translate="label">
        <label>Catalog Category (Without Subcategories)</label>
        <remove name="right.reports.product.viewed" />
        <reference name="right">
            <block type="reports/product_viewed" before="right.permanent.callout" name="left.reports.product.viewed" template="reports/product_viewed.phtml" />
        </reference>
    </catalog_category_layered_nochildren>
</layout>

所以,还有catalog_category_layered_nochildren