O
O
Oleg2018-05-12 18:40:09
MODX
Oleg, 2018-05-12 18:40:09

How to write msOptions output with fenom?

There is an option output:


Tell me how to write this through fenom?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Oleg, 2018-05-14
@ovvivus

I meant this:

{$_modx->runSnippet('msOptions', [
'product' => $id,
'options' => 'name',
'tpl' => 'tpl.msOptions'
])}

S
Sanes, 2018-05-12
@Sanes

<div class="uk-width-large-1-2 uk-margin-bottom">			
        {'msProductOptions' | snippet : [
        'tpl' => 'msProductOptions'
        ]}	
        <p class="uk-text-large"><span class="uk-align-right uk-text-primary">{$price} руб.</span>Цена:</p> 
        {include 'formitOrderForm'}
      </div>

{if $options?}
<ul class="uk-list uk-list-line uk-text-bold">
{foreach $options as $option}
<li>
<span class="uk-align-right">
    {if $option.value is array}
        {$option.value | join : ', '}
    {else}
        {$option.value}
    {/if}
</span>
{$option.caption}
</li>
{/foreach}
</ul>
{/if}

<div class="uk-width-large-1-2 uk-margin-bottom">
  <div class="uk-grid uk-grid-small">
    <div class="uk-width-1-4">
      <a href="{$id | url}"><img src="{$thumb}" alt="" class="uk-thumbnail"></a>
    </div>
    <div class="uk-width-3-4">
      <h3 class=""><a href="{$id | url}" class="uk-link-muted">{$pagetitle}</a></h3>
      <ul class="uk-grid uk-grid-width-medium-1-2 uk-text-small">
        <li>Класс: <a href="{$parent | url}"><span class="uk-text-bol">{'pdoField' | snippet : ['id'=>$id, 'top'=>1]} </span></a></li>
        <li>Цена: <span class="uk-text-bol">{$price} руб.</span></li>
        <li>Вид: <span class="uk-text-bol">{$view | join : ', '}</span></li>
        <li>Душевая: <span class="uk-text-bol">{$douche | join : ', '}</span></li>
        <li>Телевизор: <span class="uk-text-bol">{$tv | join : ', '}</span></li>
        <li>Кондиционер: <span class="uk-text-bol">{$air | join : ', '}</span></li>
      </ul>
    </div>
  </div>
</div>

https://u1.msk.greenpark.space/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question