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

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.

1 Like

@KetanKumar Can u help me this problem?

@Jone1

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

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

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

1 Like

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.

@Jone1

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

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.

1 Like

@Jone1

you mean like this Search Bar

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?

Best regards.

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

1 Like

Hi @I_KNOW_NOTHING

Thank you for your solution. Let me try.

Best regards.