【问题标题】:How to show wishlist block in header magento如何在标题 magento 中显示愿望清单块
【发布时间】:2012-04-27 11:41:00
【问题描述】:

我希望能够在我的 magento-1.6 站点的标题块上加载我的“愿望清单”。 我正在使用 magento1.6.2.0。现在我的愿望清单显示在左侧块上。 我只是将wishlist.xml的引用从左侧更改为像

这样的标题
 <reference name="header">
        <block type="wishlist/customer_sidebar" name="wishlist_sidebar" as="wishlist"  template="wishlist/sidebar.phtml"/>
    </reference>

但它不会来 我怎样才能做到这一点..?我要编辑哪个 xml 文件..?

【问题讨论】:

    标签: php magento magento-1.6


    【解决方案1】:

    所有布局 XML 文件都是一个 - 也就是说,它们被合并为典型渲染的一部分。

    您需要编辑 page/html/header.phtml 文件并添加以下代码:

    <?php echo $this->getChildHtml('wishlist') ?>
    

    在您执行任何此操作之前,您应该阅读Official Magento Knowledge Base 上的文章,特别注意主题层次结构和开发人员文章。正确进行主题自定义的时间是在项目开始时。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-08-09
      • 1970-01-01
      • 1970-01-01
      • 2020-02-11
      • 1970-01-01
      • 1970-01-01
      • 2019-09-25
      • 1970-01-01
      相关资源
      最近更新 更多