Plugin Author
TC.K
(@wp_dummy)
If I am not mistaken you have a custom meta with meta key ‘aprice’ and the meta field value is like “$100, $200, $300”. If this is your case, i am afraid you wrongly use the plugin.
The ‘between’ compare operator only work with pure numeric. Basically It is the sql query that use to compare numbers only. Since you got currency mark in your custom field it will be not treated as numbers. Therefore you got no result from the search.
what do i need to do in order to get results in search? let’s say i wanna get results between $1 and $100? isn’t this possible? if not, would you recommend any other pluging that does it? yours was one of the greatest plugins around here that i’ve seen and i couldn’t see any better than this in terms of query search filter.. any help or ideas?
thanks..
Plugin Author
TC.K
(@wp_dummy)
Well,
In order to use compare (or other sql operator), why don’t you store your aprice in numbers only? You can add the currency mark when display the ‘aprice’.
I can’t find any other plugin that does the same things. That’s why I developed this plugin.
i get my ‘aprice’ directly from an active xml feed. so, it’s not in my hands to remove the currency mark. though, is there any way to start a new meta field and remove the currency mark, i don’t know actually. i’m not really a programmer or so. but if i’m told the logic or shown the way, i could do it i guess. because, your plugin is really what i’ve been looking for.
Plugin Author
TC.K
(@wp_dummy)
I don’t how your xml feed work or structure is. But basically you can parse the xml data and get rid of the currency mark, then store that numbers in your aprice meta field.
You can refer to this example
thank you for all the responses. i guess i gotta find a way to remove that mark in order to use the plugin properly.
thanks again mate..
extra question: will you in the future consider adding currency sorting option to this plugin?
example
Plugin Author
TC.K
(@wp_dummy)
The plugin is basically make use of wp_query class to function.There is limitation in sorting query. However, we can manipulating the query to sort in the way we like, of course it is harder to accomplish.
The easiest solution that I can think of so far is storing the currency mark in references value in custom field. For example :
1 => $,
2 => £
3 => euro
The ‘1’,’2′ and ‘3’ are the values we store in custom field, and the ‘$’, ‘£’ and ‘euro’ are the values we displayed. Thus we can use the stored numbers as the sorting references.
will you in the future consider adding currency sorting option to this plugin?
Well, probably not. Like i said, it is not in wp_query class. However, maybe I will add a filter for search result so that user can manipulating the result by their preferences.