Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Obtaining Order Currency Rate Topic   - - - - -

 
  • arnas00
  • Newbie
  • Members
  • Join Date: 25-Jun 19
  • 9 posts

Posted 19 August 2019 - 12:40 AM #1

How can I find for sure the currency of an order? Because it is not stored directly with orders, and in order data it is stored only the secondary currency (by the way, using a rather criptic letter code, 'R' for currency information). But how can I know the currency the order was created with at the time of its creation? Maybe using the main currency from settings is not a good idea because it can change over time.

Thank you!



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19954 posts

Posted 19 August 2019 - 06:31 AM #2

At the time of order creation, you can use the CART_SECONDARY_CURRENCY constant in php or $smarty.const.CART_SECONDARY_CURRENCY variable in templates


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • arnas00
  • Newbie
  • Members
  • Join Date: 25-Jun 19
  • 9 posts

Posted 20 August 2019 - 01:02 AM #3

Thank you eComLabs, but I was refering to obtaining the currency of an order _after_ it was created. In other words, I want to know right now the currency of order x that was created yesterday.

Also, why is that name of "secondary currency"?

Thanks for your time!



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19954 posts

Posted 20 August 2019 - 05:17 AM #4

Primary currency means base store currency, secondary - used one

 

You can use

$order_id = 123;
$order_info = fn_get_order_info($order_id);
fn_print_r($order_info['secondary_currency']);

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • arnas00
  • Newbie
  • Members
  • Join Date: 25-Jun 19
  • 9 posts

Posted 20 August 2019 - 03:43 PM #5

Thank you eComLabs for your time and help for clearing my mind.

PS: Still thinking those are funny and tricky names.