Init Currencies

```php /**

  • Init currencies

    *
  • @param array $params request parameters
  • @return boolean always true

    /

    function fn_init_currency($params)

    {

    $cond = $join = $order_by = '';



    if ((AREA == 'C') && defined('CART_LOCALIZATION')) {

    $join = " LEFT JOIN ?:localization_elements as c ON c.element = a.currency_code AND c.element_type = 'M'";

    $cond = db_quote('AND c.localization_id = ?i', CART_LOCALIZATION);

    $order_by = “ORDER BY c.position ASC”;

    }



    if (!$order_by) {

    $order_by = 'ORDER BY a.position';

    }

    $currencies = db_get_hash_array("SELECT a.
    , b.description FROM ?:currencies as a LEFT JOIN ?:currency_descriptions as b ON a.currency_code = b.currency_code AND lang_code = ?s $join WHERE status = 'A' ?p $order_by", 'currency_code', CART_LANGUAGE, $cond);



    if (!empty($params['currency']) && !empty($currencies[$params['currency']])) {

    $secondary_currency = $params['currency'];

    } elseif (($c = fn_get_cookie('secondary_currency' . AREA)) && !empty($currencies[$c])) {

    $secondary_currency = $c;

    } else {

    foreach ($currencies as $v) {

    if ($v['is_primary'] == 'Y') {

    $secondary_currency = $v['currency_code'];

    break;

    }

    }

    }



    if (empty($secondary_currency)) {

    reset($currencies);

    $secondary_currency = key($currencies);

    }



    if ($secondary_currency != fn_get_cookie('secondary_currency' . AREA)) {

    fn_set_cookie('secondary_currency'.AREA, $secondary_currency, COOKIE_ALIVE_TIME);

    }



    $primary_currency = '';



    foreach ($currencies as $v) {

    if ($v['is_primary'] == 'Y') {

    $primary_currency = $v['currency_code'];

    break;

    }

    }



    if (empty($primary_currency)) {

    reset($currencies);

    $first_currency = current($currencies);

    $primary_currency = $first_currency['currency_code'];

    }



    define('CART_PRIMARY_CURRENCY', $primary_currency);

    define('CART_SECONDARY_CURRENCY', $secondary_currency);



    Registry::set('currencies', $currencies);



    return true;

    }

    ```



    Can you help me, i want to change not to divide but to multiply , thanks in advance