Conditional logic

Using Conditional Logic in Shopify Custom Options

Show 'Engraving text' only when customer checks 'Add engraving'. Hide 'Photo upload' unless product allows it. Conditional logic keeps forms clean without limiting options.

Last updated: July 28, 20266 min readBy the Print It My Way team

3 conditional patterns

  1. Show/hide field — 'Show engraving text field IF Engrave=yes'
  2. Show/hide field group — 'Show Photo section IF Product type=photo'
  3. Cascading dropdowns — 'Style options depend on selected Category'

Setup on Print It My Way Pro

  1. Personalizer → New field → Add condition
  2. Rule: Field 'Add engraving' equals 'Yes' → Show this field
  3. Support AND/OR/NOT compound rules
  4. Verify by toggling controlling field in preview

Common use cases

Performance considerations

Client-side conditional logic evaluates on every field change. Modern apps use lightweight rule engines (<5 KB overhead). Older apps with heavy state management add noticeable lag — check Lighthouse before committing.

Frequently asked questions

What is conditional logic in Shopify product options?

Show or hide fields based on other selections. E.g. show 'Engraving text' only when customer checks 'Add engraving'. Keeps forms clean.

Which Shopify apps support conditional logic?

Print It My Way Pro ($13.99/mo), Bold Product Options ($14.99+), Hulk Product Options, Fancy Product Designer. Free tier apps rarely support.

Can conditional logic use AND/OR/NOT?

Yes on modern apps. 'Show shipping upgrade IF product weight > 5 lbs AND destination = US'. Compound rules supported on Print It My Way Pro + Bold.

Do I need code for conditional fields on Shopify?

No if using an app with visual rule builder. Custom code only if you're building without an app (rare).

How does conditional logic affect product schema?

Hidden fields don't appear in the DOM until shown, so they don't count against page bloat. Product schema (JSON-LD) only includes visible variants.

Can conditional logic depend on customer group (B2B vs retail)?

On Shopify Plus + B2B, yes — customer tag drives conditional logic. Non-Plus: use hidden product tags + client-side JS to check customer tag.

Show/hide by cart quantity — supported?

Print It My Way Pro supports quantity-based conditional pricing (tiered). Field visibility by cart quantity is uncommon; usually pricing changes are enough.

How to test conditional logic before going live?

In personalizer app's preview mode. Toggle each controlling field and verify dependent fields show/hide correctly. Also test on real product page in incognito browser.

What if customer changes a field that hides a filled dependent field?

Best UX: keep the filled value in memory, restore if customer re-enables. Alternate: warn 'This will clear your input'. Print It My Way defaults to keep-in-memory.

Can conditional logic trigger Cart Transform pricing?

Yes indirectly — hidden field with a fee is not counted; shown field is. Fee logic naturally follows conditional visibility.

Related reading

Try it free on Shopify

Print It My Way's permanent Free plan includes live preview + Cart Transform pricing + POD integrations. No credit card required.

Install Print It My Way