Search by price

giridhar Addagalla asked on November 14, 2018 06:09

Hi I a adding the custom search filters in the search page, here i am adding the drop down with check boxes showing the price range from 0-100, 100-200 etc and their count value for that i am trying to concatenate the string searchText = searchText + " skuprice:[(double)1.0 TO (double)300000.0]"; but there is no change in the result, is this string is a valid for searching based on prices, and other thing is displaying the count in price list eg: [checkbox] price 1-100 (50) [checkbox] price 100-200 (10) this is what my UI will be, can you help me in these two things that 1. is the searcText is valid like that and other is how to display the count for that.

Recent Answers


Rui Wang answered on November 15, 2018 17:57

If you use the Kentico search filter web part, you can add filter values like these.

SKUPrice;[(decimal)0 TO (decimal)50];$0 - $50
SKUPrice;[(decimal)50 TO (decimal)250];$50 - $250
SKUPrice;[(decimal)250 TO (decimal)5000];$250 - $5000
0 votesVote for this answer Mark as a Correct answer

giridhar Addagalla answered on November 16, 2018 07:56

thanks for the above answer,But i am using the custom code to create the search filters can you suggest the answer how to use in searchHelper(parameters) because the searchText is one of the parameter which we are sending to searchHelper().

0 votesVote for this answer Mark as a Correct answer

Rui Wang answered on November 16, 2018 15:24

I couldn't get the search parameters to work. But here maybe a different way for you to think about this.

If using the out of box search filter (ID: pricerangefilter) and add the above options, when you choose the first option, the URL would be searchtext=&searchmode=anyword&pricerangefilter=0;

If you chose option 1 and 3, the URL would be searchtext=&searchmode=anyword&pricerangefilter=0;2

So maybe your code would be changing the filter options instead of change the actual URL query.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.