P
P
PetrovAnto2020-04-18 17:41:21
MODX
PetrovAnto, 2020-04-18 17:41:21

How to make options dependency using msOptionsPrice2?

This functionality implements the msOptionsPrice.option snippet, it is similar to the msOptions snippet and serves to display product modification options...

I seem to be doing everything as stated in the documentation, but I still get 2 with all the parameters, and there is no dependence between them. Tell me how to be?

Output template:
{foreach $options as $name => $values}
    <div class="form-group">
        <label class="col-md-2 control-label" for="option_{$name}">{('ms2_product_' ~ $name) | lexicon}:</label>
        <div class="col-md-10">
              
            <select name="options[{$name}]" class="input-sm form-control" id="option_{$name}"
                {if $constraints[$name]}
                    data-constraints="{$constraints[$name]| json_encode: 256 | htmlentities}"
                {/if}
                >
                {foreach $values as $value index=$index }
                    <option value="{$value}"
                     
                    {if $constraints[$name]}
                        data-relations="{$relations[$name][$value]| json_encode: 256 | htmlentities}"
                    {/if}
                         
                    >
                        {$value}</option>
                   
                {/foreach}
            </select>
        </div>
    </div>
{/foreach}

Calling options:

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question