0

I have searched the internet but still haven't found the answer to my question. Hope that someone here can help me.

I want to add a conditional field to the advanced search. For example, if a visitor fills out a number in the searchfield, the results will be in a range of -10 till +10 of the filled out value so, for example, if the filled out value would be 149 the search results should include products with values from 139 till 159 for that specific attribute. Can this be realised and if so, how can I realise this in the search form?

  • Erik,please tell me what is mean by "results will be in a range of -10 till +10 of the filled out number"? – Amit Bera Feb 3 '15 at 12:05
0

Erik,Create a input field at

app/design/frontend/yourPackage/yourtemplate/template/catalogsearch/advanced/form.phtml  and   

on class Mage_CatalogSearch_Block_Advanced_Result where is fetch product depends on search field on _getProductCollection() function put setLimit('startno','limit') to get no limit product of search.

| improve this answer | |
  • I'm sorry Amit, but I think that my question isn't quite clear. Assume that I have an attribute 'length' wich is visible in the advanced search. It's a textfield in wich the length (in cm) of a product can be filled out in numbers. Is it possible that a visitor can fill out a number in the 'length' field for example 149. The results from the search should be the products wich are 10 cm smaller till products that are 10cm longer (so 149 will show results from 139-159). Is this possible and if so, how can this be realised? Regards, Erik – Erik Feb 3 '15 at 17:14
  • will looking this.. – Amit Bera Feb 3 '15 at 17:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.