2015-05-17 6 views
-1

Я создаю интернет-магазин с Magento. Я загрузил бесплатную тему HelloWired. Я использую английский и голландский в своем интернет-магазине. Существует языковой коммутатор, который позволяет клиенту переключаться между этими языками.Языковой переключатель Magento показывает дважды

Моя проблема заключается в том, что этот переключатель отображается дважды. Я проверил файл макета page.xml, и я заметил, что он упоминается там дважды. Но если я удалю один из них, он либо ничего не сделает, либо удалит оба.

Кто может помочь мне удалить один из языковых переключателей?

Это код из файла page.xml:

<block type="page/html" name="root" output="toHtml" template="page/3columns.phtml"> 

     <block type="page/html_head" name="head" as="head"> 
      <action method="addJs"><script>lib/ccard.js</script></action> 
      <action method="addJs"><script>prototype/prototype.js</script></action> 
      <action method="addJs" ifconfig="dev/js/deprecation"><script>prototype/deprecation.js</script></action> 
      <action method="addJs"><script>prototype/validation.js</script></action> 
      <action method="addJs"><script>scriptaculous/builder.js</script></action> 
      <action method="addJs"><script>scriptaculous/effects.js</script></action> 
      <action method="addJs"><script>scriptaculous/dragdrop.js</script></action> 
      <action method="addJs"><script>scriptaculous/controls.js</script></action> 
      <action method="addJs"><script>scriptaculous/slider.js</script></action> 
      <action method="addJs"><script>varien/js.js</script></action> 
      <action method="addJs"><script>varien/form.js</script></action> 
      <action method="addJs"><script>varien/menu.js</script></action> 
      <action method="addJs"><script>mage/translate.js</script></action> 
      <action method="addJs"><script>mage/cookies.js</script></action> 

      <action method="addItem"><type>skin_js</type><name>js/jquery-1.7.1.min.js</name></action>     
      <action method="addItem"><type>skin_js</type><name>js/imgpreview.js</name></action> 
      <action method="addItem"><type>skin_js</type><name>js/hello.jquery.js</name></action> 
      <action method="addItem"><type>skin_js</type><name>js/less.min.js</name></action> 
      <action method="addItem"><type>skin_js</type><name>js/respond.min.js</name><params/><if>IE</if></action> 
      <action method="addItem"><type>skin_js</type><name>js/cufon-yui.js</name></action> 
      <action method="addItem"><type>skin_js</type><name>js/jquery.cycle.all.js</name></action> 
      <action method="addItem"><type>skin_js</type><name>js/custom.js</name></action> 

      <action method="addCss"><stylesheet>css/widgets.css</stylesheet></action> 
      <action method="addCss"><stylesheet>css/styles.css</stylesheet></action> 
      <action method="addCss"><stylesheet>css/responsive.css</stylesheet></action> 
      <action method="addCss"><stylesheet>css/custom.css</stylesheet></action> 
      <action method="addItem"><type>skin_css</type><name>css/styles-ie.css</name><params/><if>lt IE 8</if></action> 
      <action method="addItem"><type>skin_js</type><name>js/pngfix.js</name><params/><if>lt IE 7</if></action> 
      <action method="addItem"><type>js</type><name>lib/ds-sleight.js</name><params/><if>lt IE 7</if></action> 

      <action method="addItem"><type>skin_js</type><name>js/ie6.js</name><params/><if>lt IE 7</if></action> 

      <action method="addCss"><stylesheet>css/print.css</stylesheet><params>media="print"</params></action> 
     </block> 

     <block type="core/text_list" name="after_body_start" as="after_body_start"/> 

     <block type="page/html_notices" name="global_notices" as="global_notices" template="page/html/notices.phtml" /> 

     <block type="page/html_header" name="header" as="header"> 
      <block type="core/text_list" name="top.menu" as="topMenu"/> 
      <block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/> 
      <block type="page/template_links" name="top.links" as="topLinks"/> 
      <block type="page/html_wrapper" name="top.bar" as="topBar" translate="label"> 
       <action method="setElementClass"><value>top-bar</value></action> 
       <block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs"/> 
      </block> 
      <block type="catalog/navigation" name="mobile-nav" as="mobile-nav" template="catalog/navigation/mobile-nav.phtml" /> 
      <block type="page/html_wrapper" name="top.container" as="topContainer" translate="label"> 
       <label>Page Header</label> 
       <action method="setElementClass"><value>top-container</value></action> 
      </block> 
      <block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/> 
     </block> 

     <block type="core/text_list" name="left" as="left" translate="label"> 
      <label>Left Column</label> 
     </block> 

     <block type="core/messages" name="global_messages" as="global_messages"/> 
     <block type="core/messages" name="messages" as="messages"/> 

     <block type="core/text_list" name="content" as="content" translate="label"> 

      <label>Main Content Area</label> 


     </block> 

     <block type="core/text_list" name="right" as="right" translate="label"> 
      <label>Right Column</label> 
     </block> 

     <block type="page/html_footer" name="footer" as="footer" template="page/html/footer.phtml"> 
      <block type="page/html_wrapper" name="bottom.container" as="bottomContainer" translate="label"> 
       <label>Page Footer</label> 
       <action method="setElementClass"><value>bottom-container</value></action> 
      </block> 
      <block type="page/template_links" name="footer_links" as="footer_links" template="page/template/links.phtml"/> 
      <block type="page/switch" name="store_switcher" as="store_switcher" template="page/switch/stores.phtml"/> 
     </block> 

     <block type="core/text_list" name="before_body_end" as="before_body_end"/> 
    </block> 

    <block type="core/profiler" output="toHtml" name="core_profiler"/> 
</default> 

<print translate="label" module="page"> 
    <label>All Pages (Print Version)</label> 
    <!-- Mage_Page --> 
    <block type="page/html" name="root" output="toHtml" template="page/print.phtml"> 

     <block type="page/html_head" name="head" as="head"> 
      <action method="addJs"><script>lib/ccard.js</script></action> 
      <action method="addJs"><script>prototype/prototype.js</script></action> 
      <action method="addJs"><script>mage/translate.js</script></action> 
      <action method="addJs"><script>prototype/validation.js</script></action> 
      <action method="addJs"><script>varien/js.js</script></action> 

      <action method="addCss"><stylesheet>css/widgets.css</stylesheet></action> 
      <action method="addCss"><stylesheet>css/styles.css</stylesheet></action> 
      <action method="addItem"><type>skin_css</type><name>css/styles-ie.css</name><params/><if>lt IE 8</if></action> 
      <action method="addCss"><stylesheet>css/print.css</stylesheet><params>media="print"</params></action> 

      <action method="addItem"><type>js</type><name>lib/ds-sleight.js</name><params/><if>lt IE 7</if></action> 
      <action method="addItem"><type>skin_js</type><name>js/ie6.js</name><params/><if>lt IE 7</if></action> 

     </block> 

     <block type="core/text_list" name="content" as="content" translate="label"> 
      <label>Main Content Area</label> 
     </block> 

    </block> 
</print> 
+0

hmm на самом деле тот, который находится под блоком 'page/html_wrapper', кажется лишним. После удаления попытайтесь обновить кеш и, если возможно, выполните переиндекс, чтобы убедиться, что они не прерывают ваши изменения. – Hatef

+0

Я пробовал это, но потом они либо исчезнут, либо ничего не изменится. –

ответ

1

Попробуйте найти .phtml файл вашей темы, которая строит страницу. Например, если коммутатор lang находится в заголовке, вам нужно найти header.phtml. Внутри этого файла, вероятно, этот код $this->getChildHtml('store_language') или какой-либо другой код, связанный с языком магазина, дважды.

+0

Да, это сработало, спасибо! –

Смежные вопросы