How to create size charts based on product metafields
Video Guide Available
This tutorial includes a step-by-step video guide to help you follow along and master the process.
How Metafield-Based Size Charts Work in Jotly
In Jotly, you can assign a size chart to show for products that have a specific metafield with a specific value. This is incredibly powerful when you have many products that share the same characteristic.
Video Tutorial
Watch this video guide to see the complete process in action:
Here's how it works:
- You create a size chart in Jotly.
- You select a product metafield from the dropdown (for example: "fabric_type").
- You enter the exact value for that metafield (for example: "silk").
Important: One chart can be assigned to only one metafield and value combination. If you need different charts for different values, you'll need to create separate charts.
Supported Metafield Types: Jotly currently supports boolean, single_line_text_field, and color type metafields. Based on customer requirements, we can extend support to other metafield types as well. If you need support for a different metafield type, please contact us!
Real-World Example
Let's say you sell clothing and you have 50 products made of silk fabric. All these products have a metafield called "fabric_type" with the value "silk". These silk products need a special size chart because silk fits differently than cotton or polyester.
Without metafield-based charts:
- You would need to manually assign the "Silk Size Chart" to all 50 products one by one.
- Every time you add a new silk product, you'd have to remember to assign the chart.
With metafield-based charts:
- You create one "Silk Size Chart" and assign it to metafield "fabric_type" = "silk".
- All 50 products automatically show the correct chart.
- Any new silk product you add will automatically show the chart (as long as it has the metafield set).
How to Set Up a Metafield-Based Size Chart
Follow these steps to create a size chart based on product metafields:
Step 1: Make sure your products have metafields
First, ensure that your Shopify products have the metafield you want to target. You can check this by:
- Going to your Shopify Admin → Products.
- Selecting a product and scrolling down to the Metafields section.
- Note the metafield namespace and key (e.g., "custom.fabric_type") and the values your products use (e.g., "silk", "cotton").
If you don't see metafields on your products, you'll need to create metafield definitions in Shopify first. Go to Settings → Custom data → Products to set up metafields.
Step 2: Create a new size chart in Jotly
- Open the Jotly Size Chart app in your Shopify admin.
- Click on Create New Chart or go to an existing chart you want to assign.
- Design your size chart with the appropriate measurements and information.
Step 3: Assign the chart to a metafield
- In the chart settings, look for the "Product Targeting" or "Where to Show This Chart" section.
- Select "Product Metafield" as the targeting method.
- From the dropdown menu, select the metafield you want to target (e.g., "custom.fabric_type").
- In the value field, enter the exact value that your products have (e.g., "silk").
- Click Save to apply the settings.
Tip: The value you enter must match EXACTLY (including capitalization) with the value in your product metafields. "Silk" is different from "silk".
Step 4: Test your size chart
- Go to your online store and visit a product page that has the metafield and value you specified.
- The size chart should automatically appear on that product page.
- Check multiple products with the same metafield value to confirm they all show the correct chart.
Multiple Examples to Understand Better
Example 1: Fabric-Based Size Charts
You have three different fabric types that fit differently:
- Chart A → Metafield: "custom.fabric" → Value: "cotton" → Shows on all cotton products
- Chart B → Metafield: "custom.fabric" → Value: "silk" → Shows on all silk products
- Chart C → Metafield: "custom.fabric" → Value: "denim" → Shows on all denim products
Example 2: Fit-Based Size Charts
You have different size charts for different fit types:
- Regular Fit Chart → Metafield: "custom.fit_type" → Value: "regular"
- Slim Fit Chart → Metafield: "custom.fit_type" → Value: "slim"
- Oversized Fit Chart → Metafield: "custom.fit_type" → Value: "oversized"
Example 3: Brand-Based Size Charts
You sell multiple brands with different sizing standards:
- Brand A Chart → Metafield: "custom.brand_name" → Value: "Nike" → Shows on all Nike products
- Brand B Chart → Metafield: "custom.brand_name" → Value: "Adidas" → Shows on all Adidas products
Understanding the Mental Model
Think of metafield-based charts as a filtering system:
- When a customer visits a product page, Jotly looks at that product's metafields.
- Jotly checks if any of your charts are assigned to match those metafields and their values.
- If it finds a match (same metafield name AND same value), it shows that chart.
- If no match is found, Jotly moves to check other targeting methods (collections, tags, vendor, or global chart).
It's like saying: "Hey Jotly, whenever you see a product with fabric_type = 'silk', show this special Silk Size Chart!"
Important Things to Remember
- One chart = One metafield + value combination: You cannot assign one chart to multiple different metafield values.
- Value must match exactly: "Silk" ≠ "silk" ≠ "SILK". Make sure the capitalization and spacing match exactly.
- Products must have the metafield: If a product doesn't have the metafield you're targeting, the chart won't show (Jotly will check other targeting methods).
- Multiple products, one chart: This method is perfect when many products share the same characteristic and need the same size chart.
Common Questions
Q: Can I assign one chart to multiple metafield values?
No, one chart can only be assigned to one metafield and value combination. If you want the same chart for "cotton" and "linen", you would need to either create two separate charts or use a different targeting method like collections or tags.
Q: What if my product has the metafield but also has a product-specific chart assigned?
The product-specific chart will always win because product-level targeting has higher priority than metafield targeting.
Q: Can I use custom metafields I created myself?
Yes! Jotly can work with any metafield that exists on your products, whether they're standard Shopify metafields or custom ones you've created.
Q: How do I know what metafields my products have?
In your Shopify admin, go to any product page and scroll down to the Metafields section. You'll see all metafields and their current values for that product. The metafield name usually appears in the format "namespace.key" (e.g., "custom.fabric_type").
Pro Tip: Metafield-based targeting is most useful when you have a large catalog with products that share common characteristics. It saves time and ensures consistency across your store!
Related Tutorials
Continue learning with these related guides