看起来从magento的local.xml更新很重要

问题描述

| 如何解决?我想不在顶部菜单中而是在“我的购物车”链接中使用“我的购物车”链接。所以我从checkout.xml中删除了:
<reference name=\"top.links\">
    <block type=\"checkout/links\" name=\"checkout_cart_link\">
        <action method=\"addCheckoutLink\"></action>
    </block>
</reference>
然后添加新参考:
<reference name=\"top.mybasket\">
    <block type=\"checkout/links\" name=\"checkout_cart_link\">
        <action method=\"addCartLink\"></action>
    </block>
</reference> 
从page.xml我添加此:
    <block type=\"page/html_header\" name=\"header\" as=\"header\">
                <block type=\"page/template_links\" name=\"top.links\" as=\"topLinks\"/>
// other blocks
                <block type=\"page/template_links\" name=\"top.mybasket\" as=\"my_basket_count\"/>
</block> 
接下来,我通过以下方式添加header.phtml:
<?php echo $this->getChildHtml(\'my_basket_count\') ?> 
一切正常。 我的问题是,如何在local.xml中完成整个过程?我尝试过,但看起来很关键!     

解决方法

        如果我正确理解您的要求,这是您需要的local.xml的内容:
<?xml version=\"1.0\"?>
<layout version=\"0.1.0\">
 <default>
  <reference name=\"top.links\">
   <remove name=\"checkout_cart_link\"/>
  </reference>
  <reference name=\"root\">
   <reference name=\"header\">
    <block type=\"page/template_links\" name=\"top.mybasket\" as=\"my_basket_count\"/>
   </reference>
  </reference>
  <reference name=\"top.mybasket\">
   <block type=\"checkout/links\" name=\"checkout_cart_link\">
    <action method=\"addCartLink\"></action>
   </block>
  </reference>
 </default>
</layout>
    

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...