Hi all, I am building an app that let’s merchants organize products in a specific way, and allows customers to select their specific option. Once a customer selects their options I want to render a collection page with the products that apply to the customer’s selection.
The products are organized in my database, and I am trying to use url query parameters to filter out the collection page.
What I am having a hard time understanding is how can I effect an already existing collection template, or create my own page so that there is a collection page that fetches info from my data base and renders out the correct products.
I cant think of a silver bullet here - each theme will be different. Another approach could be to use an App Proxy to display a custom page in the merchant’s theme, but then matching the layout could be awkward. Alternatively, perhaps your app could tag products that have particular options and then you could filter by tag/URL.
Hi, thanks for the input! That’s sort of the conclusion that I’ve been coming to as well. Do you know if the same filtering functionality can be achieved with metaobjects? I see you can add filters, but can I add filters via my app? I found the GQL for filters but honestly not sure if this is what I think it is.
My thinking is that Metaobjects would be the best way to store information in Shopify, but Tags seem like the most straight forward solution.
The app I’m building is for automotive parts and organizing them by Year, Make and Model. The issue I see with tags, is that if a merchant needs to edit their content my app would need to display all tags for that product, merchant would have to remove the tag(s), then merchant would create a new tag. Or a product might have many Year/Make/Models, so in that case a product might contain a hundred tags, which could be very difficult to manage.
Does this make sense, or am I over complicating this?
Hey, thanks for your input, and sorry for the delayed response!
I would definitely prefer to use metaobjects, as I think that would give me the best functionality that I’m looking for. That being said, I haven’t been able to find any resources telling me that I’m not allowed to require merchants to enable search and discovery. I went through the App restrictions here, and it seems like this would be allowed: https://shopify.dev/docs/apps/store/requirements#1-prohibited-and-restricted-app-configurations
So my thinking is that during my app onboarding process for merchants, part of onboarding the app should be enabling Search and Discovery, thus letting my app use URL params on the collection page to change the filtering of that page.
I’m not sure if you have any input on app eligibility for something like this?
If not, I may have to just go the tagging route as it seems like that’s really the only other viable option if I want to use a theme’s default collection template.