Basically,magento is change the currency at Mage_Directory_CurrencyController on switchAction() function.
And using _redirectReferer() is redirect to previous page.
May the REFERER url getRefererUrl() is not working thus magento redirect to home page .
And as send a site url has been send as option url for redirection after currency change thus it redirect to home page.
see Mage_Core_Controller_Varien_Action on function.
protected function _redirectReferer($defaultUrl=null) { $refererUrl = $this->_getRefererUrl(); if (empty($refererUrl)) { $refererUrl = empty($defaultUrl) ? Mage::getBaseUrl() : $defaultUrl; } $this->getResponse()->setRedirect($refererUrl); return $this; }
Solution:
you need check previous page url value by adding code:
$refererUrl = Mage::helper('core')->urlDecodeAndEscape( $this->getRequest()->getParam('uenc')) );
at Mage_Directory_CurrencyController. it should be give you previous page url