This topic is locked
[SOLVED]

REST API Currency

2/26/2022 9:41:32 PM
PHPRunner Tips and Tricks
A
AJShumak author

Hi,

Next issue with my Rest API data. Currency shows as 1 this is a penny. But if I set to currency, it shows a $1.00
More custom view?

Sergey Kornilov admin 2/28/2022

Yes, use ''View as' Custom.

A
AJShumak author 3/3/2022

Hi,

Any suggestions what to put? Please to find?

Aln

aadham 3/3/2022

Something like this maybe:

$value="$" .$data['CURRENCY_FIELD_NAME'];
or
$value="USD" .$data['CURRENCY_FIELD_NAME'];

Hope this is what you're looking for.

A
AJShumak author 3/4/2022

Hi,

Thanks for the attempt. But that screwed other fields up somehow...
Ill keep playing with it...unless someone else has an idea...

aadham 3/4/2022

Can you please provide more specific details as to how other fields were affected?

A
AJShumak author 3/4/2022

Hi,

The data in all but two other fields were lost...not showing.

aadham 3/5/2022

I'm not quite sure the above code will have any effect on any field other than the one it's being used for.
I used the exact same code in a project last year for the very same purpose and faced no problems whatsoever.
Good luck!