【问题标题】:Magento get recently viewed product Customer wiseMagento 获取最近查看的产品 客户明智
【发布时间】:2013-05-20 11:41:10
【问题描述】:

我想了解客户最近浏览过的产品,这样如果客户下次可以访问该网站并登录,他就可以找到最后一次看到的产品

请帮帮我

提前谢谢你

【问题讨论】:

    标签: magento magento-1.7


    【解决方案1】:

    我确信 Magento 已经在 Mage_Reports_Block_Product_Viewed 块中这样做了。

    这可以添加到主页并使用模板 app\design\frontend\base\default\template\reports\home_product_viewed.phtml

    主页“cms_index_index”和帐户主页“customer_account_index”的 xml 布局应如下所示:

    <cms_index_index>
        <reference name="content">
            <block type="reports/product_viewed" name="home.reports.product.viewed" alias="product_viewed" template="reports/home_product_viewed.phtml" after="product_new">   
                <action method="addPriceBlockType">
                    <type>bundle</type>
                    <block>bundle/catalog_product_price</block> 
                    <template>bundle/catalog/product/price.phtml</template>
                </action>
            </block>
        </reference>
    </cms_index_index>
    
    <customer_account_index>
        <reference name="my.account.wrapper">
            <block type="reports/product_viewed" name="home.reports.product.viewed" alias="product_viewed" template="reports/home_product_viewed.phtml" after="product_new">   
                <action method="addPriceBlockType">
                    <type>bundle</type>
                    <block>bundle/catalog_product_price</block> 
                    <template>bundle/catalog/product/price.phtml</template>
                </action>
            </block>
        </reference>
    </customer_account_index>
    

    【讨论】:

    • 您要显示哪个页面?如果是 cms 页面,您可以通过设计选项卡下的管理部分添加它
    • 我想在账户仪表板和主页中显示它
    • 我已编辑 xml 以匹配客户帐户和主页。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-05-26
    • 2013-11-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多