Form with auto-suggest and redirect if collection exists

3 0 0

Hi all!


My store supplies ready made and custom cushions. The ready made cushions are organized in collections by make and model of vehicle. I would like to create a form for customers to fill out with drop downs for make and model of vehicle. It would be great to populate these drop down based on the collections that exist in the store so that I don't have to remember to update the form when new collections are added.


Also, if the collection doesn't exist( because  that make and model is not in stock), I would like to redirect the customer to a form to enter dimensions so that a custom cushion can be quoted.


 Is there an example to refer to to cut down on the trial and error and get me to minimum viable product quickly? I can iteratively refine from there...


The Ajax API doesn't have an easy way to query all collections.

The /search/suggest.json   REST API only returns products. It doesn't get me collections information.


The Storefront GraphQL arguments

"query": "query { collections(first: 250) { edges { node { title } } } }"


Limits the returns to 250. I'd like an argument that returns all!


Thanks in advance for any assistance you may be able to lend.

Replies 0 (0)