Copy link to clipboard
Copied
For a listing website (not a online shop or eCommerce) I need to show the prices in two currencies. In US-dollars and Euros. The base currency is the US-dollar. So the price in Euros has to be converted with an exchange rate. In a web app I've placed the exchange rate. In the other web app (the listing) is among other items the US-dollar field.
I know how to make a calculation for one web-app-item field with liquid, but I don't know how to execute this for two separate items in two different web-apps.
Perhaps some one could direct me to BC documentation or does know the code for this. Since I'm a newbie to Liquid I don't know where to look for in the BC doc's.
(BTW: I'm looking for a Liquid solution first. If for some reason it's not possible I switch to a Jquery library.)
I hope some one could help me with this.
Kind regards,
Carla
Copy link to clipboard
Copied
Update:
As a workaround I've created a new web app. The web app item name is the input-value for the exchange rate. The code then would be:
{{item.['USD-EUR-rate'] | strip_html | convert: "number" | times: item.['price usd'] | number: "N2"}}
It works fine for two currencies.
It would be ideal that you could manipulate the web-app item fields. Combine them with other fields from different web apps or retrieve the data stored in that field. (many-to-many relation). Filter and sort your data with the item-fields.