{extends 'template:1'} {block 'title'} {$_modx->setPlaceholder('placetitle', ($_modx->resource.longtitle ?: 'Штатные магнитолы для ' ~ $_modx->resource.pagetitle ~ ' на Android купить в ' ~ $city_rp ~ ' по низкой цене в интернет-магазине D-AUDIO'))} {'placetitle' | placeholder} {/block} {block 'description'} {set $description = 'Купить штатную магнитолу для ' ~ $_modx->resource.pagetitle ~ ' с CarPlay, Android Auto и навигатором можно в компании D-AUDIO. Установка в день покупки. Гарантия. Доставка по РФ. Звоните: ' ~ $_modx->config.phone } {/block} {block 'minifyx'} {parent} {*'!jsonldFx' | snippet : [ 'productName' => $pagetitle, 'productDescription' => $description, 'url' => $_modx->resource.id | url, ]*} {/block} {block 'content'}
{set $razdel = $_modx->resource.parent} {if $razdel} {set $grazdel = $razdel|resource:'parent'} {/if} {if $grazdel} {set $grandrazdel = $grazdel|resource:'parent'} {/if} {if $grandrazdel} {set $ggrandrazdel = $grandrazdel|resource:'parent'} {switch $ggrandrazdel} {case 13435} {'!pdoResources' | snippet : [ 'parents' => $grandrazdel, 'depth' => 0, 'limit' => 0, 'tvPrefix' => '', 'sortby' => 'pagetitle', 'sortdir' =>'ASC', 'includeTVs' => 'avatar', 'tpl' => 'category__single' 'templates' => 5, ]} {default} {/switch} {/if} {switch $grandrazdel} {case 13435} {'!pdoResources' | snippet : [ 'parents' => $grazdel, 'depth' => 0, 'limit' => 0, 'tvPrefix' => '', 'sortby' => 'pagetitle', 'sortdir' =>'ASC', 'includeTVs' => 'avatar', 'tpl' => 'category__single' 'templates' => 5, ]} {*
{$razdel | resource: "parent" | mylink} > {$razdel | mylink} > {$_modx->resource.id | mylink}
*} {default} {/switch} {switch $grazdel} {case 13435} {'!pdoResources' | snippet : [ 'parents' => $razdel, 'depth' => 0, 'limit' => 0, 'tvPrefix' => '', 'sortby' => 'pagetitle', 'sortdir' =>'ASC', 'includeTVs' => 'avatar', 'tpl' => 'category__single' 'templates' => 5, ]} {default} {/switch} {switch $razdel} {case 13435} {'!pdoResources' | snippet : [ 'parents' => $_modx->resource.id, 'depth' => 0, 'limit' => 0, 'tvPrefix' => '', 'razdel' => true, 'sortby' => 'pagetitle', 'sortdir' =>'ASC', 'includeTVs' => 'avatar', 'tpl' => 'category__single' 'templates' => 5, ]} {default} {/switch}
{switch $_modx->resource.id} {case 13435}
{'!pdoResources' | snippet : [ 'parents' => $_modx->resource.id, 'depth' => 0, 'limit' => 0, 'tvPrefix' => '', 'sortdir' =>'ASC', 'includeTVs' => 'avatar', 'tpl' => 'category__single__brands' 'templates' => 5, ]}
{default} {/switch}
{set $where = [ 'template' => 3, 'Data.image IS NOT NULL', ]} {if $_modx->config.showZero != 1} {set $where['Data.price:>'] = 0} {/if} {var $get = ($.get | toJSON) | md5} {* Проверяем, есть ли фильтр уже в кеше *} {if !$filter = $_modx->cacheManager->get('msearch2/settings/' ~ $get ~ '/filters')} {set $filter = $_modx->runSnippet('!mFilter2', [ 'element' => 'msProducts', 'class' => 'msProduct', 'parents' => $id, 'showHidden' => 0, 'showUnpublished' => 0, 'processTVs' => 0, 'includeTVs' => 'optionProcessor,optionRAM,optionMemory,optionInternet,option2k,option360,optionChastotaProcessora,remain,Оптовая цена,optionDopinfo', 'suggestions' => 1, 'values_delimeter'=>';', 'limit' => 24, 'maxLimit' => 100, 'filters' => ' ms|price:number ', 'showLog' => 0, 'sort' => ' price:asc ', 'where' => $where, 'aliases'=>' ms|vendor==vendor, msopoption|size==size, ms|price==price ', 'tvPrefix' => '', 'tpls' => 'tpl.msProducts.row.fx_model_intovar', 'ajaxMode' => 'scroll', 'paginator' => 'pdoPage', 'showLog' => 0, 'includeThumbs' => 'normal', 'tplOuter' => 'tpl.mFilter2.outer.fx_model', 'tplFilter.outer.size' => 'tpl.mFilter2.filter.outer', 'tplFilter.row.size' => 'tpl.mFilter2.filter.size', 'tplFilter.outer.vendor' => 'tpl.mFilter2.filter.outer', 'tplFilter.row.vendor' => 'tpl.mFilter2.filter.checkbox.brand', 'tplFilter.outer.price' => 'tpl.mFilter2.filter.slider', 'tplFilter.row.price' => 'tpl.mFilter2.filter.number' ])} {* Сохраняем фильтр в кеш *} {set $null = $_modx->cacheManager->set('msearch2/settings/' ~ $get ~ '/filters', $filter)} {/if} {* Подключаем JS-скрипты и прописываем config на странице *} {'!mFilterJS' | snippet} {* Показываем фильтр из кеша *} {if $_modx->resource.id != 13435} {$filter} {/if}
{if $_modx->resource.content}
{$_modx->resource.content}
{/if} {/block} {*
*}