Currency conversion

  • Posts: 14
  • Thank you received: 2
  • Hikamarket Multivendor Hikashop Business
10 years 11 months ago #137368

Hi, does hikashop have some currency conversion functions?

I need to convert from currency ID to another currency ID.

Thanks in advise!

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 11 months ago #137371

Hi,

www.hikashop.com/support/integrated-docu...ency-form.html#infos

Rate : The rate of the currency based on the main currency set in the configuration page. The main currency will always have a rate of 1. As you can see, on this screenshot, the main currency is Euro.


Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 2
  • Hikamarket Multivendor Hikashop Business
10 years 11 months ago #137385

Sorry, I didn't express myself well...I need to convert currencyes to an payment accepted currency...

Just done with this little snippet

$app = JFactory::getApplication();
      $currencyClass = hikashop_get('class.currency');
      $paymentCurrencyId = $currencyClass->get($this->payment_params->payment_currency)->currency_id;
      $orderCurrencyId = (int)$app->getUserState(HIKASHOP_COMPONENT.'.currency_id', $currencyClass->mainCurrency());
      $totalInPaymentCurrency = $currencyClass->convertUniquePrice(round($order->cart->full_total->prices[0]->price_value_with_tax, (int)$this->currency->currency_locale['int_frac_digits']), $orderCurrencyId, $paymentCurrencyId);

Best regards!

Please Log in or Create an account to join the conversation.

Time to create page: 0.061 seconds
Powered by Kunena Forum