Yes Vekia, I want to display the product. If user enters another search term and clicks on a result, I would display that too, thereby adding products to my page. Thats what I need.
I tried what you suggested, but wasnt successful. I could get the autocomplete to work, but couldnt get the final result. Please help.
My customer has scrapped this requirement.. so now I have another requirement which is stumping me:
on a custom tpl I have a <input type="text" > which is used for entering product reference and another one for product name. For both input boxes, I want to add autocomplete functionality. I tried adding "$this->context->controller->addJqueryPlugin('autocomplete');" in my controller's initContent function and then added following in the tpl:
<input type="text" id="ref" name="ref"/> <script> {literal} $(function() { var refdata = ["AHS2571", "AHS327","AHP1234"]; $("#ref").autocomplete( source: refdata, ); }); {/literal} </script>
I would be populating "refdata" array on page load. However, even with hardcoded values, autocomplete is not showing anything. There is no error in console.
Can someone help me to resolve this?