Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 01-26-2013 16:16:49

jamesdan567
Member
Registered: 01-20-2013
Posts: 32

updating currency table

I need to write a script for Cron to update currency conversion rates automatically, daily. But I don't know which table stores the currency conversion fields. Anyone know which one it is? Else i am faced with 1 by 1 search... thanks in advance,
James

Offline

 

#2 01-26-2013 23:42:37

Iceit88
Member
From: Fairview, PA
Registered: 11-19-2003
Posts: 549
Website

Re: updating currency table

Hi, I already have a script that will do this.  See my link below, and contact me if you would like more info.


Bryan

Hat Trick Sports, LLC

Offline

 

#3 01-27-2013 01:14:58

jamesdan567
Member
Registered: 01-20-2013
Posts: 32

Re: updating currency table

Thanks, but its only a small time investment for me to setup the program in perl or objective-c.

Offline

 

#4 01-28-2013 08:41:06

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: updating currency table

The table is core_settings.  Set the 'value' for the following 'id's:

core.currconv.AUD
core.currconv.CAD
core.currconv.CHF
core.currconv.EUR
core.currconv.GBP
core.currconv.JPY
core.currconv.USD

Assuming your base currency for your system is USD, make sure that one is set to '1.0000' and all others are multiples based on the USD conversion value.


Nick Hendler

Offline

 

#5 02-25-2013 02:24:39

jamesdan567
Member
Registered: 01-20-2013
Posts: 32

Re: updating currency table

got it. Thanks! Also, I wanted to add other currencies. I tried the steps for doing this in the CCP7 notes, but it failed (i am in CCP8) . I was using the raw sql entry feature. any ideas? i cut and paste...

the entry was

INSERT INTO core_settings VALUES('core.currcdp.PHP', 'Philippine Pesos (PHP): Decimal Character', 'core', 'Currency Settings: Conversions and Symbols', 'TEXTBOX-REG', '', '1', '.', 'Enter the decimal character for the Philippine Pesos (PHP) currency. This character is used in amounts shown in the Australian Dollars (PHP) currency.')

and the error was

A problem was encountered while executing the SQL statement submitted. The error was reported as: The MySQL extension encountered a problem submitting an SQL statement. MySQL reported the error as: Column count doesn't match value count at row 1

looks to me like a value is missing. fields and values add up to 9 instead of ten. as far as i can tell...

any help much appreciated.
James

Offline

 

#6 02-25-2013 09:10:32

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: updating currency table

Use this SQL:

Code:

INSERT INTO core_settings VALUES('core.currcdp.PHP', 'Philippine Pesos (PHP): Decimal Character', 'core', 'Currency Settings: Conversions and Symbols', 'TEXTBOX-REG', '', '', '1', '.', 'Enter the decimal character for the Philippine Pesos (PHP) currency. This character is used in amounts shown in the Australian Dollars (PHP) currency.')

We added a 'displayinclude' column in CCP8 which is right before the 'required' column.


Nick Hendler

Offline

 

#7 02-25-2013 12:45:04

jamesdan567
Member
Registered: 01-20-2013
Posts: 32

Re: updating currency table

worked perfectly. thanks! i made the fix to the other 3 Inserts too. Now i can manage the new currency via the backend and the new currency is in the drop down list...

These work in CCP 8

#1
INSERT INTO core_settings VALUES('core.currcdp.PHP', 'Philippine Pesos (PHP): Decimal Character', 'core', 'Currency Settings: Conversions and Symbols', 'TEXTBOX-REG', '', '', '1', '.', 'Enter the decimal character for the Philippine Pesos (PHP) currency. This character is used in amounts shown in the Australian Dollars (PHP) currency.')

#2
INSERT INTO core_settings VALUES('core.currconv.PHP', 'Philippine Pesos (PHP): Conversion Rate', 'core', 'Currency Settings: Conversions and Symbols', 'TEXTBOX-REG', '', '','1', '1.000', 'Enter the conversion rate for the Philippine Pesos (PHP) currency. This rate is used with amounts stored in the Base Currency to arrive at an amount for this currency to display to customers. Calculation: (Base x Rate = Display)')

#3
INSERT INTO core_settings VALUES('core.currcth.PHP', 'Philippine Pesos (PHP): Thousands Character', 'core', 'Currency Settings: Conversions and Symbols', 'TEXTBOX-REG', '', '', '1', '.', 'Enter the thousands character for the Philippine Pesos (PHP) currency. This character is used in amounts shown in the Philippine Pesos (PHP) currency.')

#4
INSERT INTO core_settings VALUES('core.currsym.PHP', 'Philippine Pesos (PHP): Currency Symbol', 'core', 'Currency Settings: Conversions and Symbols', 'TEXTBOX-REG', '', '', '1', 'PHP', 'Enter the currency symbol for the Philippine Pesos (PHP) currency. This symbol is appended to amounts shown in the Philippine Pesos (PHP) currency.')

#5
INSERT INTO core_selectcustom VALUES('core.currency.PHP','core','core.currency','Philippine Pesos','PHP','1')

Offline

 

#8 06-07-2015 14:45:21

franconero
Member
Registered: 11-03-2012
Posts: 31

Re: updating currency table

My Currency symbol is not displaying properly on my website.  I input ₦ as the symbol for Nigerian Naira but is is displaying &#8358 on my website. What do I do?

Offline

 

#9 06-08-2015 13:10:54

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: updating currency table

That's not a widely used symbol.  You might be better off using NGN.


Nick Hendler

Offline

 

Board footer