Это демо-аккаунт, раз в сутки все изменения откатываются.
Создать полноценный аккаунт
catalog.app
Основной каталог
Wildberries
Ozon
Основной каталог
Onliner
Каталог
Аналитика
Задачи
Цены
Разное
KZT
UAH
EUR
USD
RUB
BYN
U9
RU
EN
Счет
0,00 BYN
Общие настройки
Общая библиотека
Приватная библиотека
Профиль
Помощь
Shop.by (фид)
Справка
Общие
Настройки шаблона
Данные о профиле экспорта
Способ обработки свойств
Загружать значения только обязательных свойств
Не загружать значения свойств
Загружать значения всех свойств
SpecificPropertiesList
Тип файла
Txt
Xml
Json
Csv
Ссылка на фид
Шаблон
Тест
Шаблоны
Yandex
Google
InMyRoom
Yandex (пример с условиями)
Google (пример с условиями)
{{ categories = {} for category in model.Categories categories[category.Id] = category end # use positive level to iterate categories from root # use negative level to iterate categories from leaf func getCategory(offer, level) i = 0 path = [] current = categories[offer.CategoryId] while current path[i] = current i = i + 1 current = categories[current?.ParentId ?? 0] end if level < 0 && path.size > -level ret path[-level] end if path.size >= level begin ret path[path.size - level - 1] end ret null end }} {{-func condition(offer) if (offer.Pictures | array.size == 0) ret false end if (offer.Parameters | array.size <= 3) ret false end if (offer.DeliveryTime == 0) ret true end if ((offer.Price * 0.94 - offer.SupplierPrice > 25) && (offer.Price < offer.MinLowCompetitorPrice * 1.03)) ret true end if ((offer.DeliveryTime <= 3) && (offer.Category | string.downcase | string.contains "холодильники") && (offer.Price * 0.94 - offer.SupplierPrice > 25) && (offer.Price < offer.MinLowCompetitorPrice * 1.03)) ret true end if ((offer.DeliveryTime <= 3) && (offer.Category | string.downcase | string.contains "стиральные") && (offer.Price * 0.94 - offer.SupplierPrice > 25) && (offer.Price < offer.MinLowCompetitorPrice * 1.03)) ret true end if ((offer.DeliveryTime <= 3) && (offer.Category | string.downcase | string.contains "духовые шкафы") && (offer.Price * 0.94 - offer.SupplierPrice > 25) && (offer.Price < offer.MinLowCompetitorPrice * 1.03)) ret true end if ((offer.DeliveryTime <= 3) && (offer.Category | string.downcase | string.contains "варочные панели") && (offer.Price * 0.94 - offer.SupplierPrice > 25) && (offer.Price < offer.MinLowCompetitorPrice * 1.03)) ret true end if ((offer.DeliveryTime <= 3) && (offer.Category | string.downcase | string.contains "кухонные плиты") && (offer.Price * 0.94 - offer.SupplierPrice > 25) && (offer.Price < offer.MinLowCompetitorPrice * 1.03)) ret true end if ((offer.DeliveryTime <= 3) && (offer.Category | string.downcase | string.contains "посудомоечные машины") && (offer.Price * 0.94 - offer.SupplierPrice > 25) && (offer.Price < offer.MinLowCompetitorPrice * 1.03)) ret true end if ((offer.DeliveryTime <= 3) && (offer.Category | string.downcase | string.contains "морозильники") && (offer.Price * 0.94 - offer.SupplierPrice > 25) && (offer.Price < offer.MinLowCompetitorPrice * 1.03)) ret true end if ((offer.DeliveryTime <= 3) && (offer.Category | string.downcase | string.contains "пылесосы") && (offer.Price * 0.94 - offer.SupplierPrice > 25) && (offer.Price < offer.MinLowCompetitorPrice * 1.03)) ret true end if ((offer.DeliveryTime <= 3) && (offer.Category | string.downcase | string.contains "встраиваемые микроволновые печи") && (offer.Price * 0.94 - offer.SupplierPrice > 25) && (offer.Price < offer.MinLowCompetitorPrice * 1.03)) ret true end if ((offer.DeliveryTime <= 3) && (offer.Category | string.downcase | string.contains "микроволновые печи") && (offer.Price * 0.94 - offer.SupplierPrice > 25) && (offer.Price < offer.MinLowCompetitorPrice * 1.03)) ret true end if ((offer.DeliveryTime <= 3) && (offer.Category | string.downcase | string.contains "вытяжки") && (offer.Price * 0.94 - offer.SupplierPrice > 25) && (offer.Price < offer.MinLowCompetitorPrice * 1.03)) ret true end if ((offer.DeliveryTime <= 3) && (offer.Category | string.downcase | string.contains "электрочайники") && (offer.Price * 0.94 - offer.SupplierPrice > 25) && (offer.Price < offer.MinLowCompetitorPrice * 1.03)) ret true end if ((offer.DeliveryTime <= 3) && (offer.Category | string.downcase | string.contains "блендеры") && (offer.Price * 0.94 - offer.SupplierPrice > 25) && (offer.Price < offer.MinLowCompetitorPrice * 1.03)) ret true end if ((offer.DeliveryTime <= 3) && (offer.Category | string.downcase | string.contains "тостеры") && (offer.Price * 0.94 - offer.SupplierPrice > 25) && (offer.Price < offer.MinLowCompetitorPrice * 1.03)) ret true end if ((offer.DeliveryTime <= 3) && (offer.Category | string.downcase | string.contains "кухонные комбайны") && (offer.Price * 0.94 - offer.SupplierPrice > 25) && (offer.Price < offer.MinLowCompetitorPrice * 1.03)) ret true end if ((offer.DeliveryTime <= 3) && (offer.Category | string.downcase | string.contains "миксеры") && (offer.Price * 0.94 - offer.SupplierPrice > 25) && (offer.Price < offer.MinLowCompetitorPrice * 1.03)) ret true end if ((offer.DeliveryTime <= 3) && (offer.Category | string.downcase | string.contains "кофеварки") && (offer.Price * 0.94 - offer.SupplierPrice > 25) && (offer.Price < offer.MinLowCompetitorPrice * 1.03)) ret true end if ((offer.DeliveryTime <= 3) && (offer.Category | string.downcase | string.contains "утюги") && (offer.Price * 0.94 - offer.SupplierPrice > 25) && (offer.Price < offer.MinLowCompetitorPrice * 1.03)) ret true end if ((offer.DeliveryTime <= 3) && (offer.Category | string.downcase | string.contains "машинки для стрижки волос") && (offer.Price * 0.94 - offer.SupplierPrice > 25) && (offer.Price < offer.MinLowCompetitorPrice * 1.03)) ret true end if ((offer.DeliveryTime <= 3) && (offer.Category | string.downcase | string.contains "фены") && (offer.Price * 0.94 - offer.SupplierPrice > 25) && (offer.Price < offer.MinLowCompetitorPrice * 1.03)) ret true end if ((offer.DeliveryTime <= 3) && (offer.Category | string.downcase | string.contains "электробритвы мужские") && (offer.Price * 0.94 - offer.SupplierPrice > 25) && (offer.Price < offer.MinLowCompetitorPrice * 1.03)) ret true end if ((offer.DeliveryTime <= 3) && (offer.Category | string.downcase | string.contains "отпариватели") && (offer.Price * 0.94 - offer.SupplierPrice > 25) && (offer.Price < offer.MinLowCompetitorPrice * 1.03)) ret true end if ((offer.DeliveryTime <= 3) && (offer.Category | string.downcase | string.contains "эпиляторы") && (offer.Price * 0.94 - offer.SupplierPrice > 25) && (offer.Price < offer.MinLowCompetitorPrice * 1.03)) ret true end if ((offer.DeliveryTime <= 3) && (offer.Category | string.downcase | string.contains "увлажнители воздуха") && (offer.Price * 0.94 - offer.SupplierPrice > 25) && (offer.Price < offer.MinLowCompetitorPrice * 1.03)) ret true end if (offer.Category | string.downcase | string.contains "диваны") ret true end if (offer.Category | string.downcase | string.contains "кровати") ret true end if ((offer.Category | string.downcase | string.contains "корпусная мебель") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.Category | string.downcase | string.contains "столы") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if (offer.Category | string.downcase | string.contains "велотренажеры") ret true end if (offer.Category | string.downcase | string.contains "беговые дорожки") ret true end if ((offer.Category | string.downcase | string.contains "скамьи") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.Category | string.downcase | string.contains "тренажеры") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.Category | string.downcase | string.contains "грузоблочные") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.Category | string.downcase | string.contains "дорожки") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.Category | string.downcase | string.contains "турники и брусья") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.Category | string.downcase | string.contains "брусья") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.Category | string.downcase | string.contains "турники") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.Category | string.downcase | string.contains "стулья") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.Category | string.downcase | string.contains "кресла") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.Category | string.downcase | string.contains "силовые рамы") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if (offer.Vendor | string.downcase | string.contains "loftyhome") ret true end if (offer.Vendor | string.downcase | string.contains "getactive") ret true end if ((offer.Vendor | string.downcase | string.contains "ikea") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.Vendor | string.downcase | string.contains "икеа") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end ret false end-}} <?xml version="1.0" encoding="utf-8"?> <yml_catalog date="{{ date.now | date.to_string '%F %R' }}"> <shop> <company>Cataloog.app Demo</company> <currencies> <currency id="{{model.Currency}}" rate="1" /> </currencies> <delivery-options> <option cost="{{model.MaxDeliveryCost}}" days="{{model.MaxDeliveryTime}}" /> </delivery-options> <name>iMarket.by</name> <url>https://imarket.by/</url> <categories> {{- for category in model.Categories}} <category id="{{category.Id}}" {{ if category.ParentId != empty -}}parentId="{{category.ParentId}}"{{ end -}}>{{category.Name}}</category> {{- end }} </categories> <offers> {{- for offer in model.Offers}} {{- if offer.Price*0.94 - offer.SupplierPrice > 45 || offer.DeliveryTime == 0 -}} <offer id="{{offer.OfferId}}" type="vendor.model" available="true"> <barcode>{{offer.BarCodes | array.join ", "}}</barcode> <categoryId>{{offer.CategoryId}}</categoryId> <currencyId>{{model.Currency}}</currencyId> <outlets> <outlet id="0" instock="{{offer.InStockAmount}}" /> </outlets> <model>{{offer.Model}} {{offer.Color}}</model> <name>{{offer.CategorySingularName}} {{offer.Model}} {{offer.Color}} {{offer.Article}} ({{offer.Vendor}})</name> {{- for parameter in offer.Parameters}} <param name="{{parameter.Name}}" {{ if parameter.Unit!= empty -}}unit="{{parameter.Unit}}"{{ end -}}>{{parameter.Value}}</param> {{- if parameter.Name == "Страна-производитель" -}} {{- capture country_of_origin -}} {{parameter.Value}} {{- end -}} {{- end -}} {{- if parameter.Name == "Производитель (страна, завод)" -}} {{- capture manufacturer -}} {{parameter.Value}} {{- end -}} {{- end -}} {{- if parameter.Name == "Длина в упаковке" -}} {{- capture length -}} {{parameter.Value}} {{- end -}} {{- end -}} {{- if parameter.Name == "Ширина в упаковке" -}} {{- capture width -}} {{parameter.Value}} {{- end -}} {{- end -}} {{- if parameter.Name == "Высота в упаковке" -}} {{- capture height -}} {{parameter.Value}} {{- end -}} {{- end -}} {{- if parameter.Name == "Вес" -}} {{- capture weight -}} {{parameter.Value}} {{- end -}} {{- end -}} {{- end -}} {{- for picture in offer.Pictures}} <picture>{{picture}}</picture> {{- end }} <country_of_origin>{{country_of_origin}}</country_of_origin> <manufacturer>{{manufacturer}}</manufacturer> <dimensions>{{length}}/{{width}}/{{height}}</dimensions> <weight>{{weight}}</weight> <description>{{offer.Description}}</description> <price>{{offer.Price}}</price> <typePrefix>{{offer.CategorySingularName}}</typePrefix> <url>https://imarket.by/product/?XML_ID={{offer.ExternalId}}&utm_source=shop.by&utm_medium=cpc&utm_campaign=yml</url> <vendor>{{offer.Vendor}}</vendor> <vendorCode>{{offer.Article}}</vendorCode> <shop-sku>{{offer.OfferId}}</shop-sku> </offer> {{- end }} {{- end }} </offers> </shop> </yml_catalog>
Отмена
×
Тестирование шаблона
Результаты