External resources search and serve on custom route?

aseupa
Shopify Partner
2 0 0

Hi! I'm scratching my head over this since a while ago and wanted to know if it's even possible or if there is a standar way of doing it.

 

Currently my shop has over +5000 (literaly) pages with a specific information (car models and its history/info) with a searching script that takes a search term and redirects to the correct shopify page url. This gives the ability to search for cars models to my users. I also have all that information in an external DB wich I can fetch trough an API (car model,brand, images, year, etc) this DB is used by another service too. Right now I have to update the cars models in both shopify pages and the external DB each time some information changes or new car model is added.

 

My end goal here is to have a search on my theme that looks for a car name and (in case it exist) redirects to a specific url (e.g /cars/ford-focus) and that the information inside that page is fetched from the external API. I'am asking too much for shopify templating? Would using an hydrogen storefront be the only way?

 

I think that the part in wich API data is fetched and served on a search result page can be done with a private app and using theme extension app to present it on the theme. But not sure how to handle the custom unique route for each result.

 

Thanks for reading!

 

Any thou

 

Reply 1 (1)

EcomGraduates
Shopify Partner
588 48 79

Build a custom app that fetches the car model data from your external API and uses it to create new Shopify pages for each car model. You could then use Shopify's built-in search functionality to search for the car model pages and redirect to them when a match is found. This approach would require significant development work, but would provide a fully integrated solution.

Use Shopify's built-in search functionality to search for car model names, but instead of redirecting to a Shopify page, redirect to a custom search results page that fetches the car model data from your external API and displays it dynamically. This approach would be less integrated than the first option, but would require less development work.

Use a third-party search app that integrates with Shopify and supports custom search result templates. You could use this app to search for car model names and redirect to a custom search results page that fetches the car model data from your external API and displays it dynamically. This approach would be the easiest to implement, but would require a paid third-party app and may not be as fully integrated as the first option.