Forums Forums Search & Filter Pro Divide each meta value

Viewing 5 posts - 1 through 5 (of 5 total)
  • Anonymous
    #243737

    We have a price range slider in some currency based on some meta key. On other language child site we want to have same search silter, but with values calculated in different currency and we don´t have separate meta key for it. Is there some easy way how to divide meta value first and than use it in filtering?

    Thanks.

    Trevor
    #243774

    I can’t think of an easy way to do this. I will refer this to our developer, Ross, for his input. It may be that this will become possible in V3 (due for release in late June).

    Ross Moderator
    #244179

    Hi Michal

    This could be done, but is a bit of PHP development work – is this something you can tackle? If so, I can give you a nudge in the right direction 🙂

    Best

    Anonymous
    #244391

    Hi Ross,

    sure, I can try it, we will see 🙂

    Thank you.

    Michal

    Ross Moderator
    #244395

    Hi Michal

    Great stuff 🙂

    So, we have a filter here:
    https://searchandfilter.com/documentation/action-filter-reference/#filter-input-object
    You can find a github link to a full example, but essentially, with this filter you can change the options in your fields, you can change the value + label.

    I guess you would want to do some check to see the currency, and then generate new values / labels – with some calculations in there to do the conversion.

    What is in the value of an option, is what gets added to the URL and ultimately what is searched against in the DB.

    Let me knnow how you get on and if you have any further questions.

    Thanks

Viewing 5 posts - 1 through 5 (of 5 total)