Topics covering webhook creation & management, event handling, Pub/Sub, and Eventbridge, in Shopify apps.
I am creating a plugin for Shopify.
My requirement is the following:
1. When a user visits the product page I want to create and show an Add-on product that is created on the fly
2. I want that add-on product to be purchasable
3. The product should not be listed in the store nor be searchable
I have written logic for the products that are created dynamically and purchasable. But I need your input in making the product hidden on the store.
Your help is appreciated!
Thanks
There's a metafield that will help to remove it from your shopify search - assuming you use that are not leveraging a third party search app. Add that to the product and it will be much harder for someone to find it.
Take a look at this page:
https://shopify.dev/api/examples/marketing-seo#hide-a-resource-from-search-engines-and-sitemaps
You will also need to make sure it doesn't show in collections like the default "all" one.
Thank you @Jason
I will enable the SEO meta data part.
But I don't understand
> You will also need to make sure it doesn't show in collections like the default "all" one.
I tried creating an automated collection and added some products to it. But I still see the products on the home page.
Can you please elaborate or share some docs about it?
Thanks
Hard to elaborate without seeing the code of your theme. But in general, as the code loops over the products to show you would need to either:
Now option 1 has drawbacks to in which you might expect to see 20 products on a page. if there's 3 products being skipped you'd only see 17. Layouts can look odd a times hence why trying to avoid them being in collections in the first place is ideal.