Predictive Search not Working on StartPage but working on Searchpage

Jhinbeinschoner
New Member
1 0 0

Greetings everyone,

 

i modified the Code of the Debut Theme so in a Desktop view there is an inline Search bar.

URL : https://crocuscards.myshopify.com/

Password : hella

 

However the Predicitve Search does not dispaly when typing in the Search bar.

The Funny thing is on the Search result page when you use the SAME search bar in the header the predicitve Seach displays correctly but the main Serach bar in the Body does not work anyomore.

URL : https://crocuscards.myshopify.com/search?q=test&options%5Bprefix%5D=last

 

I am new to Shopify and i tried out comparing the code with the search-drawer.liquid but found nothing that solves the problem.

Thanks in advance

 

Greetings

Florian

0 Likes
tim
Shopify Expert
2864 119 942

Hi Florian,, 

the reason why your input field does not work on most pages, is because predictive search handler binds itself to the first field matching the search criteria, which is the one in the (hidden) drawer. It does not monitor yours.

Your field works on the search page because theme loads additional  handler for the search field other than the one in drawer and your input field kinda intercepts it (as it's higher on the page). Therefore the main search field does not work anymore, but yours does.

Would need some javascript coding to fix it.

 

Want to hire me to tweak a theme? Mail me at tairli@yahoo.com!
My post solved your problem? Like it!
0 Likes