Answer the question
In order to leave comments, you need to log in
Why does the order of options change when the page is refreshed?
{$_modx->runSnippet("msProductOptions", [
'onlyOptions' => $parent | resource : 'options',
'product' => $id,
'tpl' => 'tpl.msProductOptions3'
])}
<-- snippet
{foreach $options as $option}
{$option.caption}:
{if $option.value is array}
{$option.value | join : ", "}
{if $option.measure_unit}
{$option.measure_unit}
{/if}
{else}
{$option.value}
{if $option.measure_unit}
{$option.measure_unit}
{/if}
{ /if}
{/foreach}
<-- chunk
Every time the page is refreshed, the order in which options are displayed changes.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question