When i activate the EUR to PND switch for currency it wont show on the modules of the theme. I think it doesn't have the conversion rate checker or pricing PHP lines to do that. What do I need to add for this in for example this file:

   $sym = Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol(); 
   $price = $_product->getPrice();
   $specialprice = $_product->getFinalPrice(); // $specialprice = $_product->getSpecialPrice();
   if($price != $specialprice){
      if($price != ''){
     echo '<p class="old-price"><span class="price-label">';
     echo $this->__('Regular Price'). ': </span>';
     echo '<span id="old-price-'.$_product->getId().'" class="price">'.$sym.''.number_format($price,2).'</span></p>';
    if($specialprice != '')
     echo '<p class="special-price">
      <span class="price-label">Special Price</span>
      <span id="product-price-384'.$_product->getId().'" class="price">'.$sym.''.number_format($specialprice,2).'</span>
     </p> ';
   }else {
    echo '<div class="price-box">
     <span id="product-price-'.$_product->getId().'" class="regular-price">
      <span class="price">'.$sym.''.number_format($price,2).'</span>                                    

Try below currency converter code.

$price = $_product->getPrice();
$baseCurrencyCode = Mage::app()->getStore()->getBaseCurrencyCode(); 
$currentCurrencyCode = Mage::app()->getStore()->getCurrentCurrencyCode();

// convert price from current currency to base currency
$priceOne = Mage::helper('directory')->currencyConvert($price, $currentCurrencyCode, $baseCurrencyCode); 

// convert price from base currency to current currency
$priceTwo = Mage::helper('directory')->currencyConvert($price, $baseCurrencyCode, $currentCurrencyCode); 

Instead of using all the symbol and number format thing, just use default Magento price display function.

echo Mage::helper('core')->currency($priceTwo, true, false);

It will display the price with current currency symbol.

| improve this answer | |

I guess you should go to “System->Manage Currency Rates” and set rates for currencies you’ve chosen before. You can use Webservicex to import currency rates from Webservicex service. Here’s how it looks like:

enter image description here

enter image description here

| improve this answer | |
  • That is not what is going wrong. I've got it working, but not for the prices of the modules of the site like featuredproductslider.phtml etc. – Axel Dekker Apr 25 '16 at 20:19
  • Get currency symbol by currency code : $currency_symbol = Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol(); – Yeshu Apr 25 '16 at 20:22
  • Get Current currency code : $currentCurrency = Mage::app()->getStore()->getBaseCurrencyCode(); – Yeshu Apr 25 '16 at 20:24

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.