• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

How to make a calculation between two web-app-items from two different web apps

Contributor ,
Apr 26, 2016 Apr 26, 2016

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

TOPICS
Developer

Views

385

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 30, 2016 Apr 30, 2016

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines