Does not appear the sign of the currency.

I added currency

admin/commerce/config/currency
Enabled currencies
RUB - Russian Ruble - руб.

in admin/structure/formatters
clone_of_commerce_price_with_no_decimals
commerce_price_with_no_decimals

added
if ($currency == 'RUB') echo ('R');

Changed in the coupon currency for rubles
Everywhere is displayed ok, but in the left column of the selected proposal is not

it's look like without 'R'

for example
_________________________________________
Day Offer

$129 for 3 nights at Golden Villas Mykonos

Only at: 79.99
Value Discount You save
449.49 82% 369.50
__________________________________________

Where it is necessary to fix something that appeared R
Please need help =(

Comments

eeyorr’s picture

You need to add your custom formats to opendeals_module.module here:

/**
 * checks current currency and returns correct symbol
 */
function opendeals_module_checkCurrency($amount) {
  switch ($amount) {
    case 'USD':
      echo '$';
    break;
    case 'GBP':
      echo '£';
    break;
    case 'EUR':
      echo '€';
    break;
  }
}
veshiyi2003’s picture

Thx for help =)
Could you make me a one more favor.
How to make R shows the amount after?

ex:
Only at: 79.99 R

eeyorr’s picture

You can change it in node--deal.tpl.php. The currency sign ("R" in your case) is rendered by
opendeals_module_checkCurrency($currency);

You have to change it in 3 places for price, original price and discount. Just move the currency function so that it comes after the format function. The first instance is price:

<?php
        opendeals_module_checkCurrency($currency); 
	    echo opendeals_module_formatMoney($price , 1);
?>

So you would change it to this:

<?php
        echo opendeals_module_formatMoney($price , 1);
        opendeals_module_checkCurrency($currency);
?>
veshiyi2003’s picture

Status: Active » Fixed

Thank you very much!!!
Now everything is cool =)))

yannisc’s picture

Status: Fixed » Closed (fixed)