I spent a few hours investigating this. I agree it is the same code due to
file: magento/app/design/frontend/rwd/default/layout/directory.xml
<default>
<reference name="head">
<block type="core/template" name="optional_zip_countries" as="optional_zip_countries" template="directory/js/optional_zip_countries.phtml" />
</reference>
<reference name="header">
<block type="directory/currency" name="currency" as="currency_switcher" template="directory/currency.phtml"/>
</reference>
<reference name="footer">
<block type="directory/currency" name="footer_currency" after="footer_store_language" template="directory/currency.phtml"/>
</reference>
</default>
The big difference is that the footer block is cached. You can make the footer currency changeer show the correct currency if you refresh the BLOCK_HTML cache in the Magento admin and then refresh the front page in your browser.
The RWD development team seem to have missed this in its test phase. I think you have uncovered a genuine bug in the RWD theme.
How to fix it?
Well I am not a Magento expert for sure and I would have thought adjusting
<?php echo $this->getChildHtml() ?>
to
<?php echo $this->getChildHtml('',false,true) ?>
in
file: magento/app/design/fromtend/rwd/default/template/page/html/footer.phtml
and
<?php echo $this->getChildHtml('footer') ?>
to
<?php echo $this->getChildHtml('footer',false,true) ?>
in
file: magento/app/design/frontend/rwd/default/template/page/3columns.phtml
with reference to:
file: magento/app/code/core/Mage/Page/Block/Html/Footer.php
public function getChildHtml($name='', $useCache=true, $sorted=true)
{
return parent::getChildHtml($name, $useCache, $sorted);
}
would have solved it (by requesting the childHtml not be built from the cache). But Magento cacheing remains an enigma to me. Maybe you know more about it and can resolve this by .phtml file manipulation alone.
The solution I have for you is to extend the class Mage_Page_Block_Html_Footer
(file magento/app/code/core/Mage/Page/Block/Html/Footer.php
) and rewrite the function getCacheKeyInfo()
to add a currency code to the cache key. This has the advantage that you can continue to benefit from the speed enhancement of the Magento cache:
file: magento/app/code/core/Mage/Page/Block/Html/Footer.php
/**
* Get cache key informative items
*
* @return array
*/
public function getCacheKeyInfo()
{
return array(
'PAGE_FOOTER',
Mage::app()->getStore()->getId(),
(int)Mage::app()->getStore()->isCurrentlySecure(),
Mage::getDesign()->getPackageName(),
Mage::getDesign()->getTheme('template'),
Mage::getSingleton('customer/session')->isLoggedIn(),
//an extra line for when the currency switcher is in the footer:
Mage::app()->getStore()->getCurrentCurrency()->getCode()
);
}
Are you familiar with creating your own module and rewriting classes? - That is the way to put this new cache key into your theme rather than editing the core class file.