Predictive Search API

Solved
Joan-Chang
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
christian95
Excursionist
19 0 3

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

0 Likes
ankur-verma
Shopify Expert
94 19 26

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.

Joan-Chang
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

Di you resolve this @Joan-Chang ?

 

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

0 Likes
JoyStreet
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
erboristeria-do
New Member
8 0 0

I dont understand too.

0 Likes
MinuSak
Excursionist
28 0 9

@ankur-verma can you please explain what code should be added where?

im also trying to add predictive search.

Thanks in advcance

0 Likes