Variant Conditions
Control when rules and snippets apply based on product variants
Variant Conditions
Variant conditions let you control exactly when rules and snippets appear based on the customer's variant selection. This powerful feature ensures customers see the right 3D preview for their specific choices.
Variant conditions are optional. If you don't set any conditions, your rule or snippet applies to all variants of the linked products.
What Are Variants?
In Shopify, variants are different versions of the same product. Common variant options include:
| Option | Example Values |
|---|---|
| Size | Small, Medium, Large, 8x10, 16x20 |
| Frame Color | Gold, Silver, Black, White |
| Material | Canvas, Poster, Metal Print |
| Style | Modern, Classic, Minimal |
WrapStudio can use these variant options to show different 3D configurations.
Understanding Match Modes
Variant conditions support four matching modes:
| Mode | Behavior |
|---|---|
| All Variants | Rule/snippet applies to all variants (no filtering) |
| Match Any | Show if any one condition is met |
| Match All | Show only if all conditions are met |
| Match None | Show only if none of the conditions are met |
Match Any (OR Logic)
Show the 3D preview if the customer selects any of the specified options.
Example: Show for "Gold Frame" OR "Silver Frame"
Color = Gold OR Color = Silver
↓ ↓
✓ Show ✓ ShowMatch All (AND Logic)
Show the 3D preview only if the customer's selection matches all conditions.
Example: Show for "Large Size" AND "Canvas Material"
Size = Large AND Material = Canvas
↓ ↓
Must match both to show ✓Match None (NOT Logic)
Show the 3D preview only if the customer's selection matches none of the conditions.
Example: Hide for "Poster" material
Material ≠ Poster
↓
Show for all other materials ✓Setting Up Variant Conditions
Locate the Variant Conditions Section
When creating or editing a rule/snippet, scroll to the Variant Display Conditions section.

Choose Your Match Mode
Select the appropriate matching mode from the dropdown:
- All Variants (default)
- Match Any
- Match All
- Match None

Add Conditions
Click Add Condition to create a new condition.

Each condition has three parts:
| Part | Description |
|---|---|
| Field | The variant option name (e.g., "Color", "Size") |
| Operator | How to compare (equals, contains, starts with, etc.) |
| Value | The value to match (e.g., "Gold", "Large") |
Configure the Condition
Fill in the condition details:

Field: Enter the exact Shopify option name
- Must match your variant option name exactly
- Case-sensitive
- Common examples: "Size", "Color", "Material", "Style"
Operator: Choose how to match
| Operator | Matches When |
|---|---|
| equals | Exact match |
| contains | Value is found anywhere |
| starts with | Value begins with |
| ends with | Value ends with |
Value: The variant option value to match
Add Multiple Conditions (Optional)
Click Add Condition again to add more conditions. Multiple conditions work with your chosen match mode.

Real-World Examples
Example 1: Different Frames, Different Snippets
Scenario: You sell the same artwork in three frame colors, and want each variant to show its matching frame in 3D.
Setup:
| Snippet | Product | Condition | Mode |
|---|---|---|---|
| Sunset Art - Gold | Sunset Print | Frame Color = Gold | Match Any |
| Sunset Art - Silver | Sunset Print | Frame Color = Silver | Match Any |
| Sunset Art - Black | Sunset Print | Frame Color = Black | Match Any |
Example 2: Canvas-Only Rule
Scenario: You have a product with both Canvas and Poster variants, but only want the 3D preview for Canvas.
Setup:
| Rule | Condition | Mode |
|---|---|---|
| Canvas Prints | Material = Canvas | Match Any |
Or alternatively:
| Rule | Condition | Mode |
|---|---|---|
| Canvas Prints | Material = Poster | Match None |
Example 3: Large Frames Only
Scenario: Only show 3D preview for sizes 16x20 and larger.
Setup:
| Rule | Conditions | Mode |
|---|---|---|
| Large Frames | Size = 16x20, Size = 20x24, Size = 24x36 | Match Any |
Example 4: Premium Option Combination
Scenario: Only show 3D preview for "Gold Frame" in sizes "Large" or "X-Large".
Setup:
| Rule | Conditions | Mode |
|---|---|---|
| Premium Gold | Frame = Gold + (Size contains "Large") | Match All |
Condition Operators Explained
Equals
Matches exactly the specified value.
Field: Color
Operator: equals
Value: Gold
✓ "Gold" → Match
✗ "Light Gold" → No match
✗ "gold" → No match (case-sensitive)Contains
Matches if the value appears anywhere in the option.
Field: Size
Operator: contains
Value: Large
✓ "Large" → Match
✓ "X-Large" → Match
✓ "Extra Large" → Match
✗ "Medium" → No matchStarts With
Matches if the option begins with the specified value.
Field: Style
Operator: starts with
Value: Modern
✓ "Modern" → Match
✓ "Modern Classic" → Match
✗ "Ultra Modern" → No matchEnds With
Matches if the option ends with the specified value.
Field: Frame
Operator: ends with
Value: Frame
✓ "Gold Frame" → Match
✓ "Silver Frame" → Match
✗ "Frame Gold" → No matchImportant Considerations
Case Sensitivity: Field names and values are case-sensitive. Make sure they match your Shopify variant options exactly.
Shopify option: "Frame Color"
✓ Field: "Frame Color"
✗ Field: "frame color"
Testing: Always test your conditions by viewing your product page and selecting different variants. Verify the 3D preview appears/hides correctly.
Troubleshooting
Condition Not Working
- Check Field Name: Must exactly match your Shopify variant option name
- Check Case: "Color" is different from "color"
- Check Value: Ensure the value exists in your variant options
- Check Mode: Verify you're using the right match mode (Any vs All)
3D Preview Not Appearing
- Verify your conditions aren't too restrictive
- Test with "All Variants" mode temporarily
- Check that the variant combination exists in Shopify
3D Preview Appears When It Shouldn't
- Review your conditions for gaps
- Consider using "Match None" for exclusions
- Check for conflicting rules/snippets

