Search by price interval in currency and other params using Searchlogic

Posted by alexandr on Stack Overflow See other posts from Stack Overflow or by alexandr
Published on 2010-04-18T10:07:57Z Indexed on 2010/04/18 10:13 UTC
Read the original article Hit count: 471

Filed under:
|
|

Hi

I need to reaqlize search in product model with prices in different currencies (price and currecny_id field). Every currency have own rate. When user search for product in price range [x, y] USD, range must be converted to all currencies and return values like

(price > from_eur AND price < to_eur AND currecny_id = 1) OR
(price > from_aud AND price < to_aud AND currecny_id = 2)

How to realize search like this using searchlogic?

© Stack Overflow or respective owner

Related posts about rails

Related posts about ruby