MiniShop2 Не отображаются опции товаров в карточке.
<div class="col-24 col-md-12 col-lg-6 mb-4 mt-3">
<div class="card rounded-0 justify-content-between h-100">
<div class="item-img">
<a href="[[~[[+id]]]]">
<img class="img-fluid d-flex justify-content-center" src="[[+thumb:default=`[[++assets_url]]components/minishop2/img/web/ms2_medium.png`]]" alt="[[+pagetitle]]">
</a>
</div>
<div class="card-block d-flex flex-column justify-content-between">
<h4 class="title">
<a href="[[~[[+id]]]]" title="[[+pagetitle]]">
[[+pagetitle]]
</a>
</h4>
<div>
<div class="item-price ms2_product_price">
<s style="color: #f00;">[[+old_price]]</s> <strong>[[+price]]</strong> [[%ms2_frontend_currency]]
</div>
<div class="d-flex justify-content-between align-items-center">
<form class="form-horizontal ms2_form" method="post">
<input type="hidden" name="id" value="[[+id]]"/>
<input name="count" id="product_price" class="input-sm form-control" value="1" type="hidden">
<button type="submit" class="btn btn-warning rounded-0" name="ms2_action" value="cart/add">
<i class="fa fa-shopping-cart"></i>
Купить
</button>
[[+stock]]
</form>
</div>
</div>
</div>
</div>
</div>



В карточке пустое место. Раньше всё работало. Версия последняя.
Комментарии: 4
{$_modx->resource.stock.0}
ЗамениЛ код [[+stock]] на {$_modx->resource.stock.0} — ни каких изменений
Тут нужен первый вариант:
{$stock.0} // в чанке
{$_modx->resource.stock.0} // на странице товара
{$stock.0} — Заработало. Спасибо.
Авторизуйтесь или зарегистрируйтесь, чтобы оставлять комментарии.