{include 'breadcrumbs'}
{include 'status_block'} {include 'tooltip_block'} {$_modx->runSnippet('!msGallery',['tpl'=>'tplMsGallerySite'])}
{set $parent_assortment = $_modx->resource.parent | resource : 'assortment'} {set $rows_assortment = json_decode($_modx->resource.assortment?:$parent_assortment, true)} {if $rows_assortment?}
{/if}
{if $article?}
{$_modx->lexicon('article')}: {$article}
{/if}
{if $availability? AND $price > 0} {$_modx->lexicon('available')} {else} {$_modx->lexicon('not_available')} {/if}
{if $rows_assortment != ""} {/if} {if $_modx->user.id | user : 'optovik' == 1} {/if} {set $options_color = $_modx->runSnippet( '!msOptions', [ 'options' => 'color', 'tpl' => 'tplMsOptions' ] )} {set $options_size = $_modx->runSnippet( '!msOptions', [ 'options' => 'size', 'tpl' => 'tplMsOptions' ] )} {if $options_color != '' OR $options_size != ''}
{$_modx->runSnippet( '!msOptions', [ 'options' => 'color', 'tpl' => 'tplMsOptions' ] )} {$_modx->runSnippet( '!msOptions', [ 'options' => 'size', 'tpl' => 'tplMsOptions' ] )}
{/if}
{if $_modx->user.id | user : 'optovik' == 1} {if $price > $price_opt}
{$price} грн
{/if}
{$price_opt > 0 ? $price_opt : $price} грн
{else} {if $price > 0} {if $old_price? AND $old_price > $price}
{$old_price} грн
{/if}
{$price} грн
{/if} {/if}
{if $availability? AND $price > 0}
{if $rows_assortment != ""} {else} {$_modx->runSnippet('!dynamicBuyButton',['idd' => "{$_modx->resource.id}"])} {/if} {if $_modx->config.include_credit_pp == 1 || $_modx->config.include_credit_ii == 1 || $_modx->config.include_credit_mb == 1} {$_modx->lexicon('credit_buy_button')} {/if}
{else} {/if}
{if $availability? AND $price > 0} {$_modx->runSnippet( '!AjaxForm', [ 'snippet' => 'quickOrder', 'form' => 'tplBuyFormOneClick' ] )} {/if}
{if $_modx->config.cultureKey != ('localizator_default_language' | option)} {set $introtext = $_modx->resource.introtext?:$_modx->resource.localizator_content} {set $content = $_modx->resource.localizator_content} {else} {set $introtext = $_modx->resource.introtext?:$_modx->resource.content} {set $content = $_modx->resource.content} {/if} {if $introtext?}
{$_modx->lexicon('item_description')}:
{$introtext | notags | truncate : 300}
{if $content?} {$_modx->lexicon('item_all_description')} {/if}
{/if}
{include 'base_characteristics_output'}
{if $item_characteristics?} {/if}
{set $files = json_decode($_modx->resource.files, true)} {if $_modx->resource.files?} {/if} {if $_modx->config.cultureKey == ('localizator_default_language' | option)}
Доставка
{$_modx->config.info_product_delivery_ua}
Оплата
{$_modx->config.info_product_payment_ua}
Повернення
{$_modx->config.info_product_return_ua}
Гарантія
{$_modx->config.info_product_garanty_ua}
{else}
Доставка
{$_modx->config.info_product_delivery}
Оплата
{$_modx->config.info_product_payment}
Возврат
{$_modx->config.info_product_return}
Гарантия
{$_modx->config.info_product_garanty}
{/if}
{if $availability == 0 OR $price == 0} {include 'other_category_items'} {/if} {var $srRegionName = $_modx->getPlaceholder('srRegion.name')} {var $srRegionContent = $_modx->getPlaceholder('srRegion.content')} {if $srRegionName?}
{$_modx->lexicon('item_description')}
{$srRegionContent}
{else} {if $content?}
{$_modx->lexicon('item_description')}
{$content}
{/if} {/if} {*if $item_characteristics?*}
{$_modx->lexicon('item_characteristics')}
{set $rows_characteristics = json_decode($_modx->resource.characteristics, true)} {foreach $rows_characteristics as $row} {if $_modx->config.cultureKey != ('localizator_default_language' | option)}
{$row.table1?:$row.table1ua} {$row.table2?:$row.table2ua}
{else}
{$row.table1ua} {$row.table2ua}
{/if} {/foreach} {$item_characteristics}
{*/if*} {set $related_services = $_modx->resource.parent | resource : 'related_services'} {if $related_services?}
{$_modx->lexicon('related_services')}
    {if $_modx->config.cultureKey != ('localizator_default_language' | option)} {$_modx->runSnippet( 'pdoResources', [ 'elementClass' => 'modSnippet', 'parents' => 29281, 'tpl' => 'tplServices', 'resources' => "1, {$related_services}", 'depth' => 0, 'limit' => 4, 'sortby' => 'publishedon', 'sortdir' => 'ASC', 'tvPrefix' => '', 'includeContent' => 1, 'includeTVs' => 'img,service_price', 'leftJoin' => '{"localizator" : {"class" : "localizatorContent","alias" : "localizator","on" : "localizator.resource_id = modResource.id"}}', 'select' => '{"localizator" : "modResource.*, localizator.*, modResource.id"}', 'where' => '{"localizator.key" : "'~ ('localizator_key' | option) ~'"}', ] )} {else} {$_modx->runSnippet( 'pdoResources', [ 'elementClass' => 'modSnippet', 'parents' => 29281, 'tpl' => 'tplServices', 'resources' => "1, {$related_services}", 'depth' => 0, 'limit' => 4, 'sortby' => 'publishedon', 'sortdir' => 'ASC', 'tvPrefix' => '', 'includeContent' => 1, 'includeTVs' => 'img,service_price' ] )} {/if}
{/if} {set $category_related_items = $_modx->resource.parent | resource : 'related_items'} {if $_modx->config.cultureKey != ('localizator_default_language' | option)} {set $related_items = $_modx->runSnippet( 'msProducts', [ 'tpl'=>'tplProduct', 'includeThumbs' => 'small,small_mobile', 'parents' => 160, 'resources' => "1,{$category_related_items}", 'includeTVs' => 'video', 'sortby' => 'RAND()', 'depth' => 5, 'showLog' => 0, 'limit' => 10, 'showZeroPrice' => 0, 'leftJoin' => '{"localizator" : {"class" : "localizatorContent","alias" : "localizator","on" : "localizator.resource_id = msProduct.id"}}', 'select' => '{ "localizator" : "msProduct.*, localizator.*, msProduct.id" }', 'where' => '{ "localizator.key" : "' ~ ('localizator_key' | option) ~ '","Data.availability":"1"}', ] )} {else} {set $related_items = $_modx->runSnippet( 'msProducts', [ 'tpl'=>'tplProduct', 'includeThumbs' => 'small,small_mobile', 'parents' => 160, 'resources' => "1,{$category_related_items}", 'includeTVs' => 'video', 'sortby' => 'RAND()', 'depth' => 5, 'showLog' => 0, 'limit' => 10, 'showZeroPrice' => 0, 'where' => '{"Data.availability":"1"}' ] )} {/if} {if $related_items?}
{$_modx->lexicon('related_items')}
    {$related_items}
{/if}
{$_modx->lexicon('item_review')} {$ticketcount == ''? '': $ticketcount}
{$_modx->runSnippet( '!TicketComments', [ 'allowGuest' => '1', 'tplComments' => 'tplTicketsCommentWrapperItem', 'tplCommentFormGuest' => 'tplTicketsCommentFormSite', 'tplCommentForm' => 'tplTicketsCommentFormLogin', 'tplCommentAuth' => 'tplTicketsCommentOneAuthSite', 'formBefore' => 0, 'autoPublish' => 0, 'autoPublishGuest' => 0, 'enableCaptcha' => 0 ] )}
{if $availability?} {include 'other_category_items'} {/if} {set $related_articles = $_modx->resource.parent | resource : 'related_articles'} {if $_modx->config.cultureKey != ('localizator_default_language' | option)} {set $rel_articles = $_modx->runSnippet( 'pdoResources', [ 'elementClass' => 'modSnippet', 'parents' => 162, 'tpl' => 'tplBlog', 'resources' => "1, {$related_articles}", 'depth' => 0, 'sortby' => 'publishedon', 'sortdir' => 'ASC', 'tvPrefix' => '', 'includeContent' => 1, 'includeTVs' => 'img,service_price', 'leftJoin' => '{"localizator" : {"class" : "localizatorContent","alias" : "localizator","on" : "localizator.resource_id = modResource.id"}}', 'select' => '{"localizator" : "modResource.*, localizator.*, modResource.id"}', 'where' => '{"localizator.key" : "'~ ('localizator_key' | option) ~'"}', ] )} {else} {set $rel_articles = $_modx->runSnippet( 'pdoResources', [ 'elementClass' => 'modSnippet', 'parents' => 162, 'tpl' => 'tplBlog', 'resources' => "1, {$related_articles}", 'depth' => 0, 'sortby' => 'publishedon', 'sortdir' => 'ASC', 'tvPrefix' => '', 'includeContent' => 1, 'includeTVs' => 'img,service_price' ] )} {/if} {if $rel_articles?}
{$_modx->lexicon('item_related_articles')}
    {$rel_articles}
{/if} {include 'faq'} {include 'seen_it_before'} {$_modx->runSnippet('!srRegion')}