Это демо-аккаунт, раз в сутки все изменения откатываются.
Создать полноценный аккаунт
catalog.app
Основной каталог
Onliner
Ozon
Wildberries
Основной каталог
Catalog
Tasks
Prices
Miscellaneous
BYN
KZT
UAH
USD
EUR
RUB
U1
RU
EN
Account
0.00 BYN
Common settings
Common library
Private library
Profile
Help
Google (фид)
Help
General
Template settings
Export profile data
Properties processing method
Load only required property values
Don't load property values
Load all property values
SpecificPropertiesList
File type
Txt
Xml
Json
Csv
Feed link
Template
Test
Templates
Yandex
Google
InMyRoom
Yandex (example with conditions)
Google (example with conditions)
{{ 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.CategoryId == 5105) || (offer.CategoryId == 5107) || (offer.CategoryId == 5110) || (offer.CategoryId == 5106) || (offer.CategoryId == 568)) ret false end if (offer.DeliveryTime == 0) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "холодильники") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "стиральные") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "духовые шкафы") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "варочные панели") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "кухонные плиты") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "посудомоечные машины") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.CategoryId == 5000) && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.CategoryId == 71) && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "морозильники") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "пылесосы") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "встраиваемые микроволновые печи") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "микроволновые печи") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "вытяжки") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "электрочайники") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "блендеры") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "тостеры") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "кухонные комбайны") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "миксеры") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "кофеварки") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "утюги") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "машинки для стрижки волос") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "фены") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "электробритвы мужские") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "отпариватели") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "эпиляторы") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "увлажнители воздуха") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "кровати") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "корпусная мебель") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "столы") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "велотренажеры")) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "беговые дорожки")) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "скамьи") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "тренажеры") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "грузоблочные") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "дорожки") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "турники и брусья") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "брусья") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "турники") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "стулья") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "кресла") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "силовые рамы") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "гантели") && (offer.Price * 0.94 - offer.SupplierPrice > 25) && (offer.DeliveryTime <=1)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "гири") && (offer.Price * 0.94 - offer.SupplierPrice > 25) && (offer.DeliveryTime <= 1)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "штанги") && (offer.Price * 0.94 - offer.SupplierPrice > 25) && (offer.DeliveryTime <= 1)) ret true end if ((offer.DeliveryTime == 0) && (offer.Category | string.downcase | string.contains "грифы") && (offer.Price * 0.94 - offer.SupplierPrice > 25) && (offer.DeliveryTime <= 1)) 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 "candy") && (offer.DeliveryTime == 0) && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.Vendor | string.downcase | string.contains "bosch") && (offer.CategoryId == 5105) && (offer.DeliveryTime == 0) && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.Vendor | string.downcase | string.contains "bosch") && (offer.CategoryId == 5002) && (offer.DeliveryTime == 0) && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.Vendor | string.downcase | string.contains "bosch") && (offer.CategoryId == 5976) && (offer.DeliveryTime == 0) && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.Vendor | string.downcase | string.contains "bosch") && (offer.CategoryId == 72) && (offer.DeliveryTime == 0) && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.Vendor | string.downcase | string.contains "bosch") && (offer.CategoryId == 5000) && (offer.DeliveryTime == 0) && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.Vendor | string.downcase | string.contains "bosch") && (offer.CategoryId == 71) && (offer.DeliveryTime == 0) && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.Vendor | string.downcase | string.contains "bosch") && (offer.CategoryId == 5001) && (offer.DeliveryTime == 0) && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.Vendor | string.downcase | string.contains "bosch") && (offer.CategoryId == 73) && (offer.DeliveryTime == 0) && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.Vendor | string.downcase | string.contains "bosch") && (offer.CategoryId == 17) && (offer.DeliveryTime == 0) && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.Vendor | string.downcase | string.contains "bosch") && (offer.CategoryId == 5005) && (offer.DeliveryTime == 0) && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.Vendor | string.downcase | string.contains "bosch") && (offer.CategoryId == 2751) && (offer.DeliveryTime == 0) && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (offer.Vendor | string.downcase | string.contains "ikea") && (offer.Price * 0.94 - offer.SupplierPrice > 25)) ret true end if ((offer.DeliveryTime == 0) && (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"?> <rss version="2.0" xmlns:g="http://base.google.com/ns/1.0"> <channel> <title>Catalog.app Demo</title> <description>Google feed example.</description> <link>https://catalog.app/</link> {{- for offer in model.Offers}} {{- if offer | condition -}} <item> <g:title>{{offer.CategorySingularName}} {{offer.Vendor}} {{offer.Model}} {{offer.Color}}</g:title> <g:brand>{{offer.Vendor}}</g:brand> <g:description>{{offer.CategorySingularName}} {{offer.Model}}, цвет: {{offer.Color}}, производитель: {{offer.Vendor}} {{offer.Description | string.truncate 4000}}</g:description> <g:id>{{offer.OfferId}}</g:id> <g:image_link>{{offer.Pictures | array.first}}</g:image_link> <link>https://imarket.by/product/?XML_ID={{offer.ExternalId}}</link> <g:availability>in_stock</g:availability> <g:cost_of_goods_sold>{{offer.SupplierPrice + offer.SupplierPrice * 0.07 + 24 | math.round 2}} BYN</g:cost_of_goods_sold> {{- for parameter in offer.Parameters}} <g:product_detail> <g:attribute_name>{{parameter.Name}}</g:attribute_name> <g:attribute_value>{{parameter.Value}} {{parameter.Unit}}</g:attribute_value> </g:product_detail> {{- if (parameter.Name | string.contains "Родитель") -}} {{- capture parent -}} {{parameter.Value}} {{- end -}} {{- end -}} {{- end }} {{ if offer.OriginalPrice != null }} <g:price>{{offer.OriginalPrice}} {{model.Currency}}</g:price> <g:sale_price>{{offer.Price}} {{model.Currency}}</g:sale_price> {{ else }} <g:price>{{offer.Price}} {{model.Currency}}</g:price> {{ end }} {{- for code in offer.BarCodes}} {{- if (code | !string.starts_with "2") || (code | !string.contains "160000203") || (code | !string.contains "5500000") || (code | !string.starts_with "02") || (code | !string.starts_with "04") -}} {{- capture barCode -}} {{code}} {{- end -}} {{- end -}} {{- end }} <g:gtin>{{barCode}}</g:gtin> <g:condition>new</g:condition> <g:color>{{offer.Color}}</g:color> {{- if (barCode == null) || (barCode | string.empty) }} {{- capture identifier_exists -}} no {{- end -}} {{- end }} <g:identifier_exists>{{ identifier_exists }}</g:identifier_exists> <g:custom_label_0>{{(getCategory offer 0)?.Name}}</g:custom_label_0> <g:custom_label_1>{{offer.Profit | math.round}}%</g:custom_label_1> <g:custom_label_2>{{offer.DeliveryTime}}</g:custom_label_2> <g:custom_label_3>{{offer.CategorySingularName}}</g:custom_label_3> <g:custom_label_4>{{(getCategory offer 2)?.Name}}</g:custom_label_4> <g:ads_labels>{{offer.Category}}</g:ads_labels> </item> {{- end }} {{- end }} </channel> </rss>
Cancel
×
Testing template
Result