How can I create a custom predictive search with a Search Template?

How can I create a custom predictive search with a Search Template?

The_Pack_Track
Shopify Partner
7 0 1

I'm trying to create a custom predictive search by creating a search template with {% layout none %} at the top and generating a json from the search responses. But I can't get the template to load.

 

This is my search.suggest.liquid template, I know it's not going to return any search results but I just want to display something for now and I'll work on turning it into a json response later.

 

 

{% layout none %}
<html>
  <body>
    <p>Hellow World</p>
  </body>
</html>

 

 

When I try to use this search with the following url

/search/suggest?type=page&q=about%20us*

 

 

I get the following response.

 

 

Invalid parameter error: Missing section_id param

 

 

I've tried setting section_id to 1 which gives a different error

 

 

Section not found: Section id `1` was not found in the theme

 

 

Any ideas how I can proceed?

 

Thanks,

 

Stu

Replies 0 (0)