Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As one of solutions, i find and use this:</p> <p>in ubercart/store/uc_store.module add new define, for example </p> <pre><code>define('RUR',0.33); </code></pre> <p>where 0.33 - is difference between default currency and new currency (RUR). <em>rur/dollar = 0.33</em></p> <p>and in uc_currency_format function add this:</p> <pre><code> global $language; if ($language-&gt;language=='ru') { $sign = ' RUB'; $thou = ','; $dec = '.'; $value = $value / RUR; $sign_after = FALSE; }; </code></pre> <p>And full function:</p> <pre><code>function uc_currency_format($value, $sign = NULL, $thou = NULL, $dec = NULL) { if ($value === NULL) { return NULL; } $output = ''; $sign_after = variable_get('uc_sign_after_amount', FALSE); $prec = variable_get('uc_currency_prec', 2); if (is_null($sign)) { $sign = variable_get('uc_currency_sign', '$'); } if (is_null($thou)) { $thou = variable_get('uc_currency_thou', ','); } if (is_null($dec)) { $dec = variable_get('uc_currency_dec', '.'); }; // If the value is significantly less than the minimum precision, zero it. if ($prec &gt; 0 &amp;&amp; round(abs($value), $prec + 1) &lt; pow(10, -$prec)) { $value = 0; } global $language; if ($language-&gt;language=='ru') { $sign = '$'; $thou = ','; $dec = '.'; $value = $value / RUR; $sign_after = FALSE; }; // Force the price to a positive value and add a negative sign if necessary. if ($value &lt; 0) { $value = abs($value); $output .= '-'; } // Add the currency sign first if specified. if ($sign &amp;&amp; !$sign_after) { $output .= $sign; } // Format the number, like 1234.567 =&gt; 1,234.57 $output .= number_format($value, $prec, $dec, $thou); // Add the currency sign last if specified. if ($sign &amp;&amp; $sign_after) { $output .= $sign; }; if ($value=='0') { $output = t('free'); }; return $output; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload