No aparece el bloque de los idiomas

ferranmaster

Nuevo usuario
Muy buenas tardes, despues de exprimir el foro he encontrado varios post refiriendose a este tema, he hecho lo q ponia en ellos, pero nada.

Tengo creada una tienda con el idioma por defecto ingles, y he creado otra en aleman. sigo todos los pasos de configuracion, y no me aparece el desplegable para elegir el idioma. Como el theme hellowired, tiene mas fallos q la ost... puse el theme default, y tachan!!! me aparece el desplegable abajo a la derecha, con lo q el fallo esta en el template. Justo hay un post en este foto en el q a un usuario le pasaba lo mismo, y le respondieron q buscase el archivo, page.xml y el header.phtml de su template y lo comparase con el default y veria como le faltaban un par de lineas de codigo, pues vale he seguido los pasos, he pegado los codigos q se mencionaban en el post, y no me aparece nada, y ya no se q mas hacer.
Alguien tiene alguna idea???

Muchas gracias.
 

OSdave

Super Moderador
Miembro del equipo
la linea que muestra el switch es
Insertar CODE, HTML o PHP:
<block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/>
en page.xml, dentro del block "header".
¿vaciaste el cache?
¿que codigo has pegado?
 

ferranmaster

Nuevo usuario
SI, vacie la cache y este es el contenido del page.xml


PHP:
-->
<layout version="0.1.0">
<!--
Default layout, loads most of the pages
-->

    <default translate="label" module="page">
        <label>All Pages</label>
        <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.latest.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/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/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="page/template_links" name="top.links" as="topLinks"/>                
                <block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/>        <-------------------AQUI ES DONDE LO PUSE----------------
		<block type="core/text_list" name="top.menu" as="topMenu"/>
                <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="page/html_wrapper" name="top.container" as="topContainer" translate="label">
                    <label>Page Header</label>
                    <action method="setElementClass"><value>top-container</value></action>
                </block>
            </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_language" as="store_language" template="page/switch/languages.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>

     <!-- Custom page layout handles -->
    <page_empty translate="label">
        <label>All Empty Layout Pages</label>
        <reference name="root">
            <action method="setTemplate"><template>page/empty.phtml</template></action>
            <!-- Mark root page block that template is applied -->
            <action method="setIsHandle"><applied>1</applied></action>
        </reference>
    </page_empty>

    <page_one_column translate="label">
        <label>All One-Column Layout Pages</label>
        <reference name="root">
            <action method="setTemplate"><template>page/1column.phtml</template></action>
            <!-- Mark root page block that template is applied -->
            <action method="setIsHandle"><applied>1</applied></action>
        </reference>
    </page_one_column>

    <page_two_columns_left translate="label">
        <label>All Two-Column Layout Pages (Left Column)</label>
        <reference name="root">
            <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
            <!-- Mark root page block that template is applied -->
            <action method="setIsHandle"><applied>1</applied></action>
        </reference>
    </page_two_columns_left>

    <page_two_columns_right translate="label">
        <label>All Two-Column Layout Pages (Right Column)</label>
        <reference name="root">
            <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
            <!-- Mark root page block that template is applied -->
            <action method="setIsHandle"><applied>1</applied></action>
        </reference>
    </page_two_columns_right>

    <page_three_columns translate="label">
        <label>All Three-Column Layout Pages</label>
        <reference name="root">
            <action method="setTemplate"><template>page/3columns.phtml</template></action>
            <!-- Mark root page block that template is applied -->
            <action method="setIsHandle"><applied>1</applied></action>
        </reference>
    </page_three_columns>
</layout>
 
Última edición:

OSdave

Super Moderador
Miembro del equipo
en el template/page/html/header.phtml de tu template, ¿hay esta linea?
PHP:
<?php echo $this->getChildHtml('store_language') ?>
 

ferranmaster

Nuevo usuario
Aki lo tengo

PHP:
<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @category    design
 * @package     default_modern
 * @copyright   Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
?>
<div class="header-container">
    <div class="header">
        <?php if ($this->getIsHomePage()):?>
        <h1 class="logo"><strong><?php echo $this->getLogoAlt() ?></strong><a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>" class="logo"><img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" /></a></h1>
        <?php else:?>
        <a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>" class="logo"><strong><?php echo $this->getLogoAlt() ?></strong><img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" /></a>
        <?php endif?>
    
    <div class="cms-links">
    <ul>
    <li class="welcome">
	<?php echo $this->getWelcome()?></li>
  <?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('toplinks')->toHtml() ?>
    </ul>
    </div>
       
       <div class="access">
          <?php echo $this->getChildHtml('topLinks') ?>
       </div>
    </div>
	<div id="navigation">
	<?php echo $this->getChildHtml('topMenu') ?>
       <?php echo $this->getChildHtml('topSearch') ?>
    <?php //echo $this->getChildHtml('connect') ?>
    <div class="clearfix"></div>
    </div>
    <!-- <div class="quick-access">
        <?php echo $this->getChildHtml('store_language') ?>    <----------AKI ESTA-----------
        <p class="welcome-msg"></p>
     
    </div> -->
    <?php echo $this->getChildHtml('topBar') ?>
    <?php //echo $this->getChildHtml('topContainer'); ?>
</div>
 

ferranmaster

Nuevo usuario
ahh kitarle las rayitas previas y dejar el <div> como los demas, no?

bueno pues acabo de modificar el header, lo he dejado asi:
PHP:
       <?php echo $this->getChildHtml('topSearch') ?>
    <?php //echo $this->getChildHtml('connect') ?>
    <div class="clearfix"></div>
    </div>
    <div class="quick-access">
        <?php echo $this->getChildHtml('store_language') ?>
        <p class="welcome-msg"></p>
     
    </div>
    <?php echo $this->getChildHtml('topBar') ?>
    <?php //echo $this->getChildHtml('topContainer'); ?>
</div>
he refrescado la cache y no me aparece....
 
Última edición:

ferranmaster

Nuevo usuario
esa ruta deberia de existir en el template q uso??? porke dentro de page solo esta _notes y html.

si te refieres al de : base/defautl/template/page/switch, pone lo siguiente:

PHP:
<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @category    design
 * @package     base_default
 * @copyright   Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
?>
<?php
/**
 * Language switcher template
 *
 * @see Mage_Page_Block_Switch
 */
?>
<?php if(count($this->getStores())>1): ?>
<div class="form-language">
    <label for="select-language"><?php echo $this->__('Your Language:') ?></label>
    <select id="select-language" title="<?php echo $this->__('Your Language') ?>" onchange="window.location.href=this.value">
    <?php foreach ($this->getStores() as $_lang): ?>
        <?php $_selected = ($_lang->getId() == $this->getCurrentStoreId()) ? ' selected="selected"' : '' ?>
        <option value="<?php echo $_lang->getCurrentUrl() ?>"<?php echo $_selected ?>><?php echo $this->htmlEscape($_lang->getName()) ?></option>
    <?php endforeach; ?>
    </select>
</div>
<?php endif; ?>
 
Última edición:

ferranmaster

Nuevo usuario
No he entendido lo que has querido decirme. He buscado en el template q uso, el hellowired" y no hay ningun archivo llamado languages.phtml.
 

xabi

Nuevo usuario
Tenia el mismo problema y con estas explicaciones logre que se me apareciera. Pero como puedo hacer que en vez de la lista desplegable sean banderitas?
 

OSdave

Super Moderador
Miembro del equipo
Arriba