I want to display the AIS block on two “product landing pages” in my store. The products are “primary” and “secondary”.
Primary products should only display on the primary page, and same for secondary – they should only display on their page. There should not be a facet selector on the left sidebar for the user to reveal secondary products on the primary page. So it seems like a hidden facet is perfect for this job!
I’ve added a facet located at product.metafields.antibody.type, where primary products have
product.metafields.antibody.primary and secondary products have
I’ve also installed the AIS block on other pages and written a custom header to represent the data from each product on each landing page. I’ve also used the outputted query parameter to filter the results on the page.
My question is this: How do I filter the products using the hidden facet so that only primary products show on the primary page?
This has been my process currently but it’s not working between steps __ and __:
- start with the metafield/facet as type “menu” not “hidden”
- go to the general /search page (https://antibodies.myshopify.com/search) and select “primary” product type
- copy the query parameter
- append the query parameter to the primary product page (https://antibodies.myshopify.com/pages/primary-antibodies)
- go to the algolia dashboard on shopify and change the facet type to “hidden”
I thought this worked at one point, but now it keeps breaking the loading for the
.instant-search block. My theory is that changing the facet type changes the inputs for the query parameter.
Is there another workaround? Possibly using debug mode?