Skip to main content

Single product with dynamic configuration options

A Single product with dynamic configuration options is a variant of Single product with size where each size shares the same nested Containers. The configuration options presented to the customer update dynamically based on the size they select, because all sizes reference the same Container by ID.

This pattern avoids duplicating Container and product definitions across sizes: any constraint or default set on the shared Container applies consistently regardless of which size is chosen.

Superburger — id: 1, type: product
Size of Burger — id: 2, type: container, min: 1, max: 1
Small Superburger — id: 3, type: product
Select Bread — id: 4, type: container, min: 1, max: 1
Normal Bread — id: 5, type: product, isSelectedByDefault: true
Extra Crispy Bread — id: 6, type: product
Medium Superburger — id: 7, type: product
Select Bread — id: 4, same container as above
Big Superburger — id: 8, type: product
Select Bread — id: 4, same container as above

All three size products reference the same Select Bread Container (id: 4), so adding a new bread option or changing the default only requires a single update.