Overview
When you add the Flex badge to your Shopify store, you may want to display it only on specific products that are HSA/FSA eligible. By default, if you add the badge to your main product template, it will appear on all products in your store. This guide shows you how to create separate product templates to control which products display the Flex badge.The problem
If you add the Flex badge directly to your default product template, it will appear on every product in your store, including products that are not HSA/FSA eligible. This can confuse customers and reduce trust in your store.The solution
Create multiple product templates in Shopify and assign them to specific products based on their HSA/FSA eligibility.Prerequisites
- Flex badge installed on your Shopify store
- Access to your Shopify theme editor
- Basic familiarity with Shopify product management
Create product templates
Step 1: Access your theme editor
- From your Shopify admin, go to Online Store > Themes
- Click Customize on your active theme
- Navigate to a product page in the theme editor
Step 2: Create an eligible products template
- In the theme editor, click the template selector at the top of the page
- Select Create template
- Name the template “Product - Eligible” or similar
- This template will be based on your existing default product template
- Add the Flex badge to this template in the location where you want it to appear
- Save the template
Step 3: Create a non-eligible products template
- Create another template following the same process
- Name it “Product - Not Eligible” or similar
- This template should be identical to your default template but without the Flex badge
- Save the template
Assign templates to products
Step 1: Navigate to products
- From your Shopify admin, go to Products
- Select a product you want to update
Step 2: Change the product template
- Scroll down to the Theme templates section
- Click Change template
- Select the appropriate template:
- “Product - Eligible” for HSA/FSA eligible products
- “Product - Not Eligible” for non-eligible products
- Save the product
Step 3: Repeat for all products
Repeat this process for each product in your store, assigning the correct template based on HSA/FSA eligibility.Best practices
- Audit your products regularly: As you add new products, remember to assign the correct template
- Use consistent naming: Keep your template names clear and descriptive
- Test before going live: Preview products with both templates to ensure the badge displays correctly
- Document your process: Keep a list of which products use which template for future reference
Troubleshooting
Badge appears on all products
If the badge still appears on all products after creating separate templates, verify that:- You removed the badge code from the non-eligible template
- You saved both templates after making changes
- You assigned the correct template to each product
Template changes not appearing
If your template changes aren’t showing on your live store:- Clear your browser cache
- Check that you published the theme changes
- Verify you’re editing the active theme, not a draft