Predictive Search API

Solved
Highlighted
Tourist
11 0 3

I have read the page about shopify predictive search API!

But I don't get it!

Is the search must modify to this layout?

01.png

And where should I insert this code? on search.liquid?

02.png

 

0 Likes
Highlighted
Tourist
19 0 2

Did you found the solution already? I am searching for exactly the same! 

0 Likes
Highlighted

This is an accepted solution.

Hi

They suggested the 4 type of layout which can be used for predictive search on any website.
You are free to have choose from these suggestion or have any different layout of your need.

And for adding the jquery code for calling.
You can add that code either on search.liquid file or theme.js file. And theme.js will be the best option.
And please make sure you added this script inside the event of adding input in search field.

Please let me know if it was helpful.

1 Like
Highlighted
Tourist
11 0 3

@christian95 @ankur-verma tell us how to edit that!

@ankur-verma Okay! so It just add some code on those file. I got it!

0 Likes
Highlighted

Di you resolve this @Joan-Chang ?

 

I am looking for the same answer but don't what code to put where

0 Likes
Highlighted
Tourist
7 0 3
Hi, what is meant by add code inside search event? Would you pls share the sample code (once added to your website) as an example
2 Likes
Highlighted
New Member
8 0 0

I dont understand too.

0 Likes