Plugin

Archived
Forum
(read-only)

Google Currency Converter

ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From Percipio

     

Doesn’t seem to work with Expresso Store

General

Tyssen
Tyssen

If I do

{exp:currency_converter:convert_currency amount="300" from="AUD" to="USD" decimal="2"

I get the correct output. If I do

{exp:store:product
 entry_id
="{entry_id}"
 
return="cart"
}
{exp
:currency_converter:convert_currency amount="{price}" from="AUD" to="USD" decimal="2"}
{
/exp:store:product} 

the value that gets output is for just $1. I’m using a beta version of Store 2 so not sure whether the problem is at their end or with this plugin.

Percipio
# 1
Developer
Percipio

Hi,
maybe price is wrong?
try to output price like,
{exp:store:product
entry_id=”{entry_id}”
return=“cart”
}
{price}
{/exp:store:product}

Tyssen
# 2
Tyssen

No, there’s nothing wrong with the price variable, it’s already outputting correctly.

Percipio
# 3
Developer
Percipio

I suppose something like “$123”? You must pass numbers, like ‘123’ but not ‘$123’

Percipio
# 4
Developer
Percipio

anyway we will upload new version in a few minutes so it will clean amount.

Tyssen
# 5
Tyssen

Yeah, that’s it, price comes with a $ prepended. That would be great if a new version could do that.

Percipio
# 6
Developer
Percipio

version 1.0.2 is ready for download. Enjoy :)

Tyssen
# 7
Tyssen

Yep, that’s done it. Thanks very much.

Maybe something else to consider: I had had Store set up to display a , separator for thousands which also broke the output. I’ve changed it to not display the comma now and it’s working fine, but you might want to build in handling for other non-numerical characters because I know different countries have different ways of formatting their numbers.