I'm trying to filter items from my catalog using facets and PriceRangeValue, like in the Enoteca example (my searching engine is Lucene). Should I create a "listprice" meta field in the Commerce Manager like I did for other filters? My other filters (SimpleValue) are properly working but I had to create meta fileds for them (and of course assign them values).
My second issue is that the currency of my products display prices are stuck to "gbp", even if the user I am loged in has a different Preferred Currency (in the Commerce Manager » Customer Management). I also set the Default Currency to another one in the Commerce Manager » Administration » Common Settings. To gather the price of one item I used the "CurrentPrice = entry.ItemAttributes.ListPrice.FormattedPrice" attribute. Am I missing something?
You can add "listprice" metafield,however by default, the listprice has been indexed as "listpriceusd" field ( with gbp it should be "listpricegbp",... ) in your search index data.
Regarding the second issue, could you try CurrencyFormatter.FormatCurrency(entry.ItemAttributes.ListPrice, "USD").
Thanks for your answer. I can not use CurrencyFormatter.FormatCurrency(entry.ItemAttributes.ListPrice, "USD") as first argument must be a decimal, ListPrice is a Price object. If I use ListPrice.FormatedPrice I have a price in £.
For the facets I'm trying to filter by accessing to the already existing metadata "Display Price", how to "bind" this field to my config file and change this currency? (cf. http://img15.hostingpics.net/pics/387071Untitled.png)
I edited my Mediachase.Search.Filters.config file like that:
<PriceRangeValue key="under-5" currency="usd" upperbound="5">
<Description locale="en-us">Up to $5</Description>
<PriceRangeValue ke... and so on