Skip to content
  1. Extras
  2. miniShop2
  3. Snippets
  4. msOptions

msOptions

Snippet for outputting product options stored as JSON.

By default these are size, color, and tags; you can add more by extending the product model.

Parameters

ParameterDefaultDescription
tpltpl.msOptionsOutput chunk
productProduct id. If omitted, current resource id is used.
optionsComma-separated list of options to output.

Output

The snippet expects a Fenom chunk and passes one variable $options (array of option values).

To see all placeholders, use an empty chunk:

modx
<pre>
  [[msOptions?
    &options=`color,size`
    &tpl=``
  ]]
</pre>

The default chunk outputs options as a select for adding to cart with the product.