Yandex Feed YML, ошибка Premature end of file
Всех приветствую, прошу помощи в вопросе.
Создаю YML файл для Яндекса, делаю по инструкции — web-revenue.ru/modx-revo/yml-dlya-yandeks-marketa
Все отлично отображается, но при валидации в Яндексе выдает
Читал смотрел, многие на кодировку говорят, но у меня UTF-8
Шаблон работает через файлы:
Сам шаблон yafeed.tpl
Создаю YML файл для Яндекса, делаю по инструкции — web-revenue.ru/modx-revo/yml-dlya-yandeks-marketa
Все отлично отображается, но при валидации в Яндексе выдает
Premature end of file.
Строка: -1, Позиция: -1
Что может быть? В какую сторону вообще копать? Читал смотрел, многие на кодировку говорят, но у меня UTF-8
Шаблон работает через файлы:
{insert 'file:template/yafeed.tpl'}
UPDСам шаблон yafeed.tpl
<?xml version="1.0" encoding="UTF-8"?>
<yml_catalog date="{'' | date: 'Y-m-d'}T{'' | date: 'H:i+03:00'}" >
<shop>
<name>{$_modx->config.site_name}</name>
<company>Название компании</company>
<url>{$_modx->config.site_url}</url>
<currencies>
<currency id="RUR" rate="1"/>
</currencies>
<categories>
{'!pdoResources' | snippet : [
'parents'=>'12',
'depth'=>'10',
'limit'=>'0',
'templates'=>'6',
'tpl'=>'@FILE template/chunk/yafeed/cat.tpl'
]}
<category id="12">Картины</category>
</categories>
<offers>
{'!msProducts' | snippet : [
'templates'=>'7',
'limit'=>'0',
'parents'=>'0',
'tpl'=>'@FILE template/chunk/yafeed/offer.tpl',
'showZeroPrice'=>'0'
]}
</offers>
</shop>
</yml_catalog>
cat.tpl<category id="{$id}" parentId="{$parent}">{$pagetitle}</category>
offer.tpl<offer id="{$id}" available="true">
<url>{$id | url : ['scheme' => 'full']}</url>
<price>{$price | replace : " " : ""}</price>
<currencyId>RUR</currencyId>
<categoryId>{$parent}</categoryId>
<picture>https://modisart.com{$image}</picture>
<delivery>true</delivery>
<model>{$article}</model>
<name>{$pagetitle}</name>
<vendor>{$_pls['vendor.name']}</vendor>
<description>{$_modx->resource.introtext ?: $_modx->resource.description}</description>
</offer>
Комментарии: 2
Ты бы показал сниппет, которым формируешь файл, сам файл, чанки.
Шаблон работает через файлы:
{insert 'file:template/yafeed.tpl'}
Сам шаблон yafeed.tpl<?xml version="1.0" encoding="UTF-8"?>
<yml_catalog date="{'' | date: 'Y-m-d'}T{'' | date: 'H:i+03:00'}" >
<shop>
<name>{$_modx->config.site_name}</name>
<company>Название компании</company>
<url>{$_modx->config.site_url}</url>
<currencies>
<currency id="RUR" rate="1"/>
</currencies>
<categories>
{'!pdoResources' | snippet : [
'parents'=>'12',
'depth'=>'10',
'limit'=>'0',
'templates'=>'6',
'tpl'=>'@FILE template/chunk/yafeed/cat.tpl'
]}
<category id="12">Картины</category>
</categories>
<offers>
{'!msProducts' | snippet : [
'templates'=>'7',
'limit'=>'0',
'parents'=>'0',
'tpl'=>'@FILE template/chunk/yafeed/offer.tpl',
'showZeroPrice'=>'0'
]}
</offers>
</shop>
</yml_catalog>
cat.tpl<category id="{$id}" parentId="{$parent}">{$pagetitle}</category>
offer.tpl<offer id="{$id}" available="true">
<url>{$id | url : ['scheme' => 'full']}</url>
<price>{$price | replace : " " : ""}</price>
<currencyId>RUR</currencyId>
<categoryId>{$parent}</categoryId>
<picture>https://modisart.com{$image}</picture>
<delivery>true</delivery>
<model>{$article}</model>
<name>{$pagetitle}</name>
<vendor>{$_pls['vendor.name']}</vendor>
<description>{$_modx->resource.introtext ?: $_modx->resource.description}</description>
</offer>
Авторизуйтесь или зарегистрируйтесь, чтобы оставлять комментарии.