How chained options are built
The pieces of a configurator and how they fit together: OpenCart options, templates, steps, collections, the visual tree and the copy each product keeps.
The building blocks
| Piece | What it is | Where you edit it |
|---|---|---|
| Option and option values | Normal OpenCart options, such as Colour with the values Sand, Sage and Terracotta. Chained Options uses them as they are. | Catalog → Options |
| Template | An ordered list of steps: the questions the customer answers, in order. | Templates section of the module |
| Step | One question of a template. It is either one option or one option collection. | Template form |
| Option collection | A reusable selection of values from one or more options, each option at its own depth level. In a template it becomes one step per option it contains, offering only the selected values. | Option collections section |
| Visual tree | Every path a customer can take through the steps, value by value. Each point of the tree is called a node. | Open tree in the template list, or the Chained options tab of a product |
| Product assignment | A product that uses a template. It receives its own copy of the tree. | Chained options tab of the product form |
Steps and paths
The customer answers the steps of the template from first to last. Each answer adds one node to the path: the node is the chosen value, reached through the values chosen before it.
The same value can therefore have different settings in different places of the tree. For example, the colour Sage can be offered after velvet and hidden after linen, or cost more after one size than after another:
Layout: Straight
Size: 220 cm
Upholstery: Linen
Colour: Sand
Upholstery: Velvet
Colour: Sage
Colour: Terracotta
Layout: Chaise
Size: 300 cm
...For each node you decide:
- whether the value is offered on that path (Enabled);
- whether it adds a fixed amount or a percentage to the price;
- whether the configuration ends after it (Cut tree here) or continues at a later step (Jump to step);
- which images the product gallery shows when it is chosen.
The details are in The visual tree.
Total combinations
The template form and the tree show Total combinations: the number of values of each step multiplied together. It is the size of the full tree before you disable values or end branches. A template with four steps of three values each has 3 × 3 × 3 × 3 = 81 combinations.
Large numbers are normal for real products, but they make the tree longer to review. Option collections help keep each step limited to the values that really exist.
What a product keeps and what it shares
When you assign a template to a product and save the product:
- the product gets its own copy of the template's tree. Changes you make in the product's tree affect only that product. Later changes in the template's tree do not reach products that already use the template;
- the steps stay shared. If you add, remove or reorder steps in the template, or add values to an option, every product that uses the template follows;
- the options of the template are added to the product as normal OpenCart product options. See Configuring a product.
What happens on the product page
On a product with an enabled template, the options of the template are shown as numbered steps, one after the other. Only the values enabled on the current path are offered, the price is recalculated after each choice and a summary shows the whole configuration with its total. The customer adds the product from the summary. See The storefront.
Products without a template keep the normal OpenCart behaviour.
Still need help?
Open a support ticket from your account and our team will look at your store with you.