Mastering Shopify Product Templates: How to Show or Hide Size Charts on Specific Products
Hey there, fellow store owners! Let's talk about something super common that often trips people up: those pesky size charts. We all know they're crucial for apparel and accessories, helping customers find the right fit and cutting down on returns. But what happens when you don't want a size chart on every single product? Say, you sell t-shirts and tracksuits, but only the tracksuits need a detailed size guide. Displaying a chart for a product where it's irrelevant can look messy and even confuse your customers.
This exact dilemma popped up in the Shopify community recently, and it's a perfect example of how a little theme savvy can go a long way. Our friend elijahr1989 was using the Reformation theme and found their size chart showing up on all products, even their t-shirts, when they only wanted it for their tracksuits. Sound familiar?
The Initial Diagnosis: App or Theme?
When you're trying to control what shows up on your product pages, the first thing to figure out is how that content is being added. As Moeed, one of our sharp community experts, wisely pointed out, if your size chart comes from a Shopify app, there's a good chance the app itself has settings to specify which products or collections it appears on. It's always worth checking those app settings first – sometimes the fix is as simple as flipping a switch!
However, elijahr1989 clarified that they had created their size chart themselves using Shopify pages, meaning it was integrated directly into their theme, not via an app. This immediately told Moeed (and now tells us!) that this was a job for theme customization. And don't worry if 'theme customization' sounds intimidating; it's often more straightforward than you think, especially with modern Shopify themes.
The Solution: Embracing Custom Product Templates
This is where the magic happens, folks. If your size chart is part of your default product template and you need it to appear selectively, Shopify's custom product templates are your best friend. This powerful feature allows you to create variations of your product pages, each with unique layouts and functionalities, without needing to duplicate your entire theme.
Why Custom Product Templates Are a Game-Changer
- Granular Control: Apply different layouts or features to specific products or collections.
- Improved UX: Tailor the customer experience by showing only relevant information.
- Reduced Clutter: Keep product pages clean and focused, enhancing readability and conversion rates.
- No Coding Required (Often): For many modern themes, removing or adding sections can be done directly in the theme editor.
Step-by-Step Guide: Creating a "No Size Chart" Product Template
Let's walk through the process, just like Moeed guided elijahr1989 to a successful resolution. This method ensures your tracksuits keep their essential size charts, while your t-shirts enjoy a cleaner, chart-free look.
Step 1: Access Your Shopify Theme Editor
First, log into your Shopify admin dashboard:
- Go to Online Store > Themes.
- Find your current theme (it should be marked as "Current theme").
- Click Actions > Edit code. (Don't worry, we're not diving deep into code unless absolutely necessary).
Step 2: Duplicate Your Default Product Template
You want to create a copy of your existing product template so you can modify it without affecting your other products. Most themes use a `product.liquid` or `main-product.liquid` file, or a section named `main-product` within a template.
- In the left sidebar, under Templates, click Add a new template.
- Select Product from the dropdown menu.
- Give your new template a descriptive name, like
no-size-chartorproduct.no-size-chart. Click Done.
This action creates a new template file (e.g., `product.no-size-chart.json` for OS2.0 themes, or `product.no-size-chart.liquid` for older themes) that is an exact replica of your default product template.
Step 3: Remove the Size Chart from the New Template
Now, we need to modify this new template to remove the size chart.
- Go back to Online Store > Themes.
- Click Customize on your current theme.
- In the theme editor, use the dropdown at the top to navigate to Products > product.no-size-chart (or whatever you named your new template).
- Once you're viewing a product page using this new template, look at the left sidebar for sections and blocks. Identify the section or block that renders your size chart. This might be a custom HTML block, a rich text block, or a custom section added by your theme or a developer.
- Click on the size chart block/section to select it, then click the Remove block or Remove section option (usually a trash can icon or a 'Remove' button).
- Save your changes.
Pro Tip: If your size chart is hardcoded into a snippet or section file and isn't a removable block, you might need to go back to Edit code and comment out or remove the specific code that calls the size chart. This usually involves looking for `{% include 'size-chart' %}` or similar Liquid code within your `product.no-size-chart.liquid` file or the section it references. If this sounds too technical, don't hesitate to reach out to a Shopify expert!
Step 4: Assign the New Template to Specific Products
Finally, assign your newly created template to the products where you don't want the size chart to appear.
- From your Shopify admin, go to Products > All products.
- Click on the product you want to modify (e.g., your t-shirts).
- On the product edit page, scroll down to the Online Store section on the right sidebar.
- Under Theme template, select your new
product.no-size-charttemplate from the dropdown menu. - Click Save.
Repeat this for all products that should not display the size chart. Your other products, still assigned to the default product template, will continue to show the size chart as before.
Beyond Size Charts: The Power of Custom Templates
This technique isn't just for size charts! You can use custom product templates to:
- Display different product information for various product types (e.g., ingredients for food products, technical specs for electronics).
- Show unique upsell or cross-sell sections.
- Vary the layout of your product images or descriptions.
- Integrate specific third-party app features only on certain products.
Need More Advanced Shopify Customization?
Whether you're just starting your journey on Shopify or looking to optimize an existing store with complex requirements, understanding and utilizing custom templates is a valuable skill. It empowers you to create a highly tailored and efficient shopping experience for your customers.
If you find yourself needing more in-depth Shopify customization, theme development, or even a full store migration, don't hesitate to reach out to the experts at Shopping Cart Mover. We specialize in making your e-commerce vision a reality, ensuring your store functions perfectly and looks fantastic.