Home›Products & Catalog›Sequential & dependent options

Sequential & dependent options

Sometimes a product option only makes sense after an earlier choice. If a shopper picks “Add engraving? → Yes”, then you want an “Engraving text” box to open up, not before. TitanCart’s sequential (or dependent) options do exactly that: an option stays locked until the customer makes a qualifying selection on another option, so you can build a step-by-step product configurator.

Edition note: Options are a TitanCart Pro feature. TitanCart Lite has no Options tab and no Products → Options page, so there is nothing to make sequential there.

Note: This article assumes you already know the basics of product options (types, choices, price modifiers). If not, read Options vs. Attributes first. Here we focus on making options conditional.

1. Where to set it up

Dependencies are configured on a product’s Options tab, which appears once the product has been saved at least once. The tab lists the product’s options with Link Global Option (copies an option and its choices from your Products → Options library onto this product) and + Create Option. Each option form has Option Name, Input Type (Select (dropdown), Radio buttons, Checkbox, Text input, Textarea, File upload), a Required checkbox and a Variants table with Name, Price +/-, Type ($ or %) and Weight +/- per choice. At the bottom of the form sit the two controls this article is about: the Compound pricing checkbox and the “Show this option only when…” block.

Because linking copies a global option, dependencies are always set per product, after the option is on the product. Changing the global library later does not touch the copies.

Note: Before you can add a dependency, the product needs at least one Select, Radio or Checkbox option with at least one choice. Those are the only types that can act as a “parent”: a Text input, Textarea or File upload has nothing to branch on. If the block says “No eligible parent options yet”, add a selectable option first. An option can never be its own parent.

2. Making an option depend on another

Open the option you want to lock until later and find “Show this option only when…”. Click + Add Rule. Each rule row is two dropdowns joined by “=”:

  • — Select option —: the parent option the rule watches.
  • — Select variant —: the choice on that parent that unlocks this option. The second dropdown stays greyed out until a parent is picked, and it resets if you change the parent.

That is a single rule: “unlock me only when the customer picks that choice.” Remove a rule with the × at the end of its row. A rule with either dropdown left blank is discarded on save. Leave the block empty and the option is always available, as normal.

For the engraving example, create an “Add engraving?” Radio option with the choices Yes and No, then on the “Engraving text” option add one rule: Add engraving? = Yes. The text box now unlocks only after the shopper chooses Yes.

Note: TitanCart refuses a rule set that loops back on itself (A depends on B and B depends on A, directly or through a chain). Saving one shows “These dependencies would create a cycle” and nothing is stored; adjust the rules so the chain runs one way.

3. Combining rules: any-of vs all-of

You can add more than one rule, and how they combine depends on whether they point at the same parent option or different ones:

  • Several rules on the same parent option = OR (any one matches). Example: unlock “Gift message” when Wrapping is Birthday or Anniversary. Add two rules, both pointing at Wrapping, one per choice.
  • Rules across different parent options = AND (all must match). Example: unlock “Monogram style” only when Material is Leather and Add monogram? is Yes. One rule per parent option.

Mix the two for more specific logic, such as “Leather and (Birthday or Anniversary)”. A Checkbox parent counts any ticked box, so a rule on a Checkbox choice matches as soon as that box is checked, whatever else is ticked.

4. Compound pricing along the chain

Each choice can carry a price modifier that is either a fixed amount or a percentage. Fixed amounts always add up. By default a percentage is calculated from the product’s unit price, the price the shopper is paying for one unit before any options. Tick Compound pricing on an option and its percentage is instead applied to the running total: the price after the options above it have already been added.

This matters for a sequence where later upgrades should build on earlier ones. If “Premium finish” adds 10% and a later “Express crafting” adds another 20%, compound pricing on Express crafting makes the 20% apply to the already-upgraded price rather than the bare unit price, the way tiered upgrades usually work. Leave it off for the simpler behaviour where every percentage is taken from the unit price. Options are applied in the order they appear on the product page, and the live price under the product name uses the same arithmetic as the cart.

5. The order on the product page

The storefront keeps a chain together: every parent is shown before the options that depend on it, and an unrelated option is never slotted into the middle of a chain. Within those rules the order follows the Move up / Move down arrows on each option card in the editor, so use them to decide which chain comes first and how standalone options sit around it. The editor itself always shows your configured order.

6. What the shopper sees

A dependent option is visible from the start but locked: greyed out, with its controls disabled and a hint underneath such as “Choose “Add engraving?” first to enable this option.” (with two parents: “Choose “Material” and “Add monogram?” first to enable this option.”). As the shopper makes the qualifying choices the option unlocks in place and the price updates. If they change a parent back, the dependent option locks again and whatever they had entered in it is cleared.

Locks are enforced when the item is added to the cart, not only on screen: a value sent for a locked option is ignored, and a locked option that is marked Required does not block the add, because the shopper could not have filled it in.

Note: What dependencies do, and don’t. They control whether an option is usable, not stock or availability; a locked option does not change inventory. They are configured per product, so the same rules have to be set on each product that needs them. And they are not variations: variations are separate purchasable versions of a product (a T-shirt in S/M/L, each with its own stock), whereas dependent options are conditional add-ons layered onto one product. For versions with their own stock and price use variations instead.

File upload options: a File upload input type is not offered, because the store does not collect the uploaded file yet. An option of that type created in an earlier release still loads and saves in the editor, but the product page shows no file picker for it and a required one never blocks the add. Use a Text input for details the shopper must supply.

Troubleshooting

  • The “Show this option only when…” block says there are no eligible parents. Add at least one Select, Radio or Checkbox option with a choice to the product first. Only those types can be a parent, and the option you are editing is never offered as its own parent.
  • My dependent option never unlocks on the storefront. Check the rule points at a choice that still exists on the parent option, and remember that rules across different parent options must all match (AND). If you meant “any of these”, put the rules on the same parent option.
  • The dependent option is usable immediately, ignoring the rule. An option with an empty rules block is always available. Confirm the rule was added to the dependent option (the one you want locked), not the parent, and that both dropdowns in the rule were filled in before saving.
  • Saving the option fails with a message about a cycle. One of the rules makes an option depend, directly or through a chain, on an option that depends on it. Remove the rule that closes the loop.
  • The options are not in the order I set. On the product page parents always come before their dependents and a chain is kept together. Use Move up / Move down to change where whole chains and standalone options sit.
  • A percentage upgrade isn’t adding up the way I expect. Decide whether it should be taken from the unit price (leave Compound pricing off) or from the running total after earlier options (turn Compound pricing on). Fixed amounts are unaffected either way.
  • The shopper’s text disappeared. They changed a parent choice, which re-locked the dependent option and cleared it. That is by design; the entry would no longer apply.
  • I want separate stock per choice. That is a variation, not an option. See Product variations & combinations.

See also

Previous
Product variations & combinations
Next
Product Bundles ("Buy Together")