Can I hide products but keep them available for purchase / buyable?
Sometimes, you may want the products to be sold as bundles instead of selling them individually on your Shopify store. In other words, you want the individual products hidden from customers but available for purchase.
* Coding is required for the following tutorial
Steps:
- Remove these products from any collection but leave them available on the online store sales channel.
- 3 options
- If you want these products to be hidden from storefront search, you can set a metafield for each of them. After that, the links to these products are hidden from the storefront search unless you share the products.
- Alternatively, you can change the button text and link with javascript, e.g. redirect the customers to the bundle page instead of adding to the cart like below:
- Adding a product tag for these products, e.g. "BYOB modify products"
- Add a javascript on the product liquid to detect the product tag. When you add .json to a product link, you'll see the product data in JSON format. Send a request the .json link to detect if the product should be modified.
- If the tag is found on the product pages, change the button text and link
- Hide or disable the add-to-cart button with liquid
- Add a product tag to these products, e.g. "BYOB hidden"
- Look for the product detail page template in your theme. (Each theme is different)
- Look for the ATC button
- Wrap the ATC button with {% unless product.tags contains "BYOB hidden" %}<button>YOUR BUTTON CODE</button>{% endunless %} and the button will be hidden
According to the Shopify product roadmap, Cart and Checkout validation for public apps is available in Oct 2023. At that time, you will be available to set custom validation rules via an app on the AppStore. BYOB may be able to support this feature as well but we don't have a concrete timeline yet.