Hi, I would like to know if someone has an updated solution for the problem found in this old topic priceRange Filter with Values in different currencies.
Basically, my Algolia records have an attribute “price” and “currency”, and I need to be able to filter prices in “CLP” using a dictionary in which I have stored the exchange rates of each currency. My products and dictionary look like this.
products = {{
name: "Product A",
price: 10.000
currency: "CLP"
},
{
name: "Product B",
price: 20
currency: "USD"
},
{
name: "Product C",
price: 15
currency: "EUR"
}}
exchange = {
date: "28/3/23"
USD: 807
EUR: 870
}
This should happen by multiplying or dividing these exchange rates so that I don’t have to constantly change the price of each product to “CLP” every time the exchange rate is updated.