Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Re: Build A Search Box

How can I customize a search box to filter products on a platform?

Jone1
Shopify Partner
27 0 8

Hi everyone,

 

- I want to customize/build the search box on Shopify. How can I get all products so I can use Javascript to filter them based on title/price/SKU...?

Note: I'm using Shopify version 1, not Shopify 2.0.

Thank you in advance.

 

Best regards,

Jones.

Replies 9 (9)

Jone1
Shopify Partner
27 0 8

@KetanKumar Can u help me this problem?

KetanKumar
Shopify Partner
37336 3654 12097

@Jone1 

Sorry you are facing this issue, it would be my pleasure to help you.

Welcome to the Shopify community!😊
Thanks for your good question.

Please share your site URL,
I will check out the issue and provide you a solution here.

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
Jone1
Shopify Partner
27 0 8

Dear @KetanKumar ,

 

- Thank you for your reply.

- I just use the Default Shopify theme. So you can try on any theme as a Debut theme...

- I just want to know the solution to solve my problem as how can I get all products data to using Javascript to handle data when typing on the search box.

Thank you in advance.

Best regards.

KetanKumar
Shopify Partner
37336 3654 12097

@Jone1 

thanks but if yo can share url so i will check error 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
Jone1
Shopify Partner
27 0 8

Dear @KetanKumar ,

 

- I mean i want to build a search box using Ajax to handle data user search. Currently, I do not have any solution to get all products to filter by a string of user typing on the search box. So I still do not develop it (so it'll be without any bugs here)

Best regards.

KetanKumar
Shopify Partner
37336 3654 12097

@Jone1 

you mean like this Search Bar

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
Jone1
Shopify Partner
27 0 8

Dear @KetanKumar,

 

- No. That's not my idea.

- I mean that's the search box. When the user is typing any text. I'll be using Javascript to filter it. The question is how can I get all products to filter it?

 

2.png

Best regards.

I_KNOW_NOTHING
Shopify Partner
45 0 11

I suggest you to check the shopify graphql api so you can retrieve all products data. Here's the link for you: https://shopify.dev/api/admin-graphql/2022-01/queries/products

Jone1
Shopify Partner
27 0 8

Hi @I_KNOW_NOTHING 

Thank you for your solution. Let me try.

 

Best regards.