2

I've managed to be able to hide the language/currency bar at the top of the screen by editing the header.phtml, however when I try to move for example the following code into the footer - it doesn't appear.

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

Am I missing something, or should I also be editing the template files?

Thanks

3

In directory.xml Change:

<reference name="header">
     <block type="directory/currency" name="currency" as="currency_switcher" template="directory/currency.phtml"/>
</reference>

to:

<reference name="footer">
     <block type="directory/currency" name="currency" as="currency_switcher" template="directory/currency.phtml"/>
</reference>

EDIT:

By Default Currency should show on footer, if you look at directory.xml line 39

<reference name="footer">
            <block type="directory/currency" name="footer_currency" after="footer_store_language" template="directory/currency.phtml"/>
        </reference> 

if it is not showing in footer so you need to add:

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

Local.xml

<reference name="footer">
<block type="directory/currency" name="footer-currency" template="directory/currency.phtml"/>
</reference>
  • That doesn't seem to add it into the footer. Have I missed a step? – James Apr 17 '15 at 13:13
  • Did you add <?php echo getChildHtml('currency_switcher') ?> to footer? – Ahmed Elawadi Apr 17 '15 at 13:17
  • I added <?php echo $this->getChildHtml('currency_switcher') ?> to the footer. – James Apr 17 '15 at 13:23
  • The location of the footer.phtml I edited was /template/page/html/footer.phtml – James Apr 17 '15 at 13:24
  • can you try in footer <?php echo $this->getChildHtml('footer_currency') ?> – Ahmed Elawadi Apr 17 '15 at 13:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.