type:
integration
system:
MODx
name:
Product Options with Ditto
description:
Basic instructions to use Ditto and child documents to build product option select boxes.
tags:
cms,
product options,
tutorial

Product Options & Modifiers

What if you have a single product that comes in various sizes? Create a dynamically generated select box using Ditto:

<select>
[[Ditto? &amp;parents=`id of container` &amp;tpl=`Foxycart-select` &amp;display=`all`]]
</select>

Where your template chunk Foxycart-select looks something like this (line breaks added for legibility):

<option name="size" value="[+ItemSize+]{p:[+ItemPrice+],w:[+ItemWeight+],c:[+PartNo+]}">
	[+ItemSize+]
</option>