【问题标题】:Magento showing top menu, search box and cart twiceMagento 显示顶部菜单、搜索框和购物车两次
【发布时间】:2014-01-17 10:45:44
【问题描述】:

Magento 两次显示顶部(类别)菜单、搜索框和购物车。

点击Here is my site link此页面显示菜单搜索框和购物车两次。

在我看来,header.phtml 被执行了两次

这里是标题 xml 我拿了这个/app/design/frontend/default/buyshop/layout/layout.xml

顶部链接

        <block type="buyshopconfig/navigation" name="buyshop.collapsedmenu" as="mobileMenu"
               template="page/html/mobilemenu.phtml"/>

        <block type="buyshopconfig/navigation" name="buyshop.advmenu.amazing" as="advMenuamazing"
               template="page/html/topmenu_amazing.phtml"/>



        <reference name="top.menu">
            <action method="unsetChild"><name>catalog.topnav</name></action>
            <block type="buyshopconfig/navigation" name="catalog.topnav.menu" template="page/html/topmenu.phtml"/>
        </reference>


        <block type="directory/currency" name="currency" template="page/switch/currency.phtml"/>
        <action method="insert">
            <block_name_to_insert>top.links</block_name_to_insert>
            <sort_relative_to_other_childname/>
            <sort_before_or_after/>
            <alias>topLinks</alias>
        </action>
    </reference>
    <!--HEADER EOF-->

    <reference name="left">
        <action method="unsetChild">
            <name>topLinks</name>
        </action>
        <block type="buyshopconfig/navigation" name="leftmenu" as="leftmenu" template="page/html/leftmenu.phtml" before="-"/>
    </reference>

    <reference name="top.links">
        <block type="buyshopconfig/comparelink" name="compare_link"/>
        <action method="addLinkBlock">
            <blockName>compare_link</blockName>
        </action>
    </reference>

    <!--FOOTER-->
    <reference name="footer">
        <block type="newsletter/subscribe" name="footer.newsletter" as="footer_newsletter" template="newsletter/subscribe.phtml"/>
    </reference>
    <!--FOOTER EOF-->
    <remove name="catalog.leftnav" />
</default>



<cms_index_index>
    <reference name="root">

我该如何解决这个问题?请帮帮我谢谢

【问题讨论】:

  • Hello 启用模板路径提示。管理面板:系统->配置->开发人员(位于页面底部)选择要启用此功能的网站或商店视图。->调试->模板路径提示
  • 我刚刚启用。我现在该怎么办??
  • 检查前端你就知道是哪个模板重复了
  • 我是 magento 的新手。你能告诉我如何正确解决这个问题吗?这是我的网站地址:ibuytohelp.com/index.php
  • 你好,在管理员中检查 cms 主页可能是你添加了这个 div

标签: magento


【解决方案1】:

. 可见桌面 { 显示:无!重要; }

它会为你工作 试试这个我刚刚在萤火虫中为你测试了这个:)

【讨论】:

    【解决方案2】:

    我发现这个问题是由这个 div - 引起的。它包含这个“第二个菜单”。使用此组合 id="spy" 浏览您的项目。您填写 find phtml 或 php 文件以及每个 this 所属的模块。如果您没有找到它,请转到 Admin->System->CMS 并尝试找到此页面或静态块。

    最好的问候!

    【讨论】:

      【解决方案3】:

      您好,我研究过相同的主题。 只需尝试将 bootstrap-responsive.css 文件第 53 行 更改为:

      .visible-desktop {display: none !important}
      

      【讨论】:

      • 如果此答案为您工作,那么您可以将其标记为正确答案。