{extends 'file:templates/index.tpl'} {block 'leftMenu'} {/block} {block 'modals'} {$_modx->runSnippet("!ecForm", [ 'tplForm' => '@FILE chunks/form_questions.tpl' 'tplSuccess' => '@FILE chunks/form_success.tpl' 'allowedFields' => 'user_name, user_email, rating, text, dignities, disadvantages' ])} {/block} {block 'content'}
{include 'file:chunks/base_mobile_search.tpl'}
{include 'file:chunks/base_breadcrumbs.tpl'}
{$_modx->runSnippet("msGallery", [ 'tpl' => '@FILE chunks/tpl_gallery_mobile.tpl', 'product' => $_modx->resource.id, 'image' => $_modx->resource.image ])}
{if $old_price > 0}
Скидка {(($old_price - $price) / ($old_price / 100)) | number_format : 0 : '.' : ' '}%
{/if} {if $new}
Новинка
{/if} {if $popular}
Хит
{/if}

Артикул: {$_modx->resource.vendor_article}

{$_modx->resource.pagetitle | replace: $_modx->resource.vendor_article : ""} {$_modx->resource.vendor_article}

{if $_pls["vendor.logo"]} {$_pls[ {/if}
{$_modx->runSnippet("!ecThreadRating", [ 'tpl' => '@FILE chunks/tpl_rating.tpl' ])} {*$_modx->runSnippet("!addComparison", [ 'list_id' => $_modx->resource.parent, 'list' => $_modx->resource.parent, 'id' => $_modx->resource.id, 'tpl' => "custim.tpl.Comparison.add" ])*} {$_modx->runSnippet("!addComparison", [ 'list_id' => $_modx->resource.parent, 'list' => $_modx->resource.parent, 'id' => $_modx->resource.id, 'tpl' => "custim.tpl.Comparison.add" ])}

Артикул: {$_modx->resource.vendor_article}

{if $_pls["vendor.logo"]}
{$_pls[
{/if}
{$_modx->runSnippet("msGallery", [ 'tpl' => '@FILE chunks/tpl_gallery_desctop.tpl', 'product' => $_modx->resource.id ])}
{$_modx->runSnippet("msGallery", [ 'tpl' => '@FILE chunks/tpl_gallery_desctop_small.tpl', 'product' => $_modx->resource.id ])}
{if ($old_price | replace : " " : "") > 0 && ($old_price | replace : " " : "") > ($price | replace : " " : "") && $_modx->resource.available != 99}
Скидка {((($old_price | replace : " " : "") - ($price | replace : " " : "")) / (($old_price | replace : " " : "") / 100)) | number_format : 0 : '.' : ' '}%
{/if} {if $new}
Новинка
{/if} {if $popular}
Хит
{/if}
{'@FILE snippets/get_options.php' | snippet : [ 'tpl' => '@FILE chunks/tpl_characters_mini.tpl' ]} {set $stores = $_modx->getPlaceholder("stores_"~$_modx->resource.id)} {* Фильтруем элементы, где available > 1 *} {set $filteredStores = []} {foreach $stores as $store} {if $store.available > 0} {set $filteredStores[] = $store} {/if} {/foreach} {* Находим элемент с минимальной ценой *} {set $minPriceStore = null} {set $minPrice = null} {set $thisCity = 0} {foreach $filteredStores as $store} {if $minPrice === null || $store.price < $minPrice} {set $minPrice = $store.price} {set $minPriceStore = $store} {/if} {if $store.store.city == $_modx->getPlaceholder('dl.id')} {set $thisCity = 1} {/if} {/foreach} {if $_modx->resource.available == 1}
Доставка:
00.00.0000
0 ₽
{if $thisCity == 1}
Самовывоз:
Сегодня
Бесплатно
{/if}
Доставка:
00.00.0000
0 ₽
{if $thisCity == 1}
Самовывоз:
00.00.0000
0 ₽
{/if}
от {$minPriceStore.price | number : 0 : '.' : ' '} ₽
Выбрать
{/if} {if $_modx->resource.available == 99}

Товара нет в наличии

{/if}
{set $strs = $_modx->getPlaceholder("stores_"~$_modx->resource.id)}
Смотрите также
{/block} {block 'rightMenu'} {include 'file:chunks/base_right_menu.tpl'} {/block}