-
Notifications
You must be signed in to change notification settings - Fork 5
/
price.yml
56 lines (56 loc) · 2.41 KB
/
price.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{% load se_extras %}
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE yml_catalog SYSTEM "shops.dtd">
<yml_catalog date="{% now "Y-m-d H:i" %}">
<shop>
<name>Shopelectro</name>
<company>Shopelectro</company>
<url>{{ base_url }}</url>
<platform>Django</platform>
<version>1.9.6</version>
<email>info@shopelectro.ru</email>
<currencies>
<currency id="RUR" rate="1"/>
</currencies>
<categories>
{% for category in categories %}
<category id="{{ category.id }}" {% if category.parent %} parentId="{{ category.parent.id }}"{% endif %}>
{{ category.name}}
</category>
{% endfor %}
</categories>
<local_delivery_cost>{{ shop.local_delivery_cost }}</local_delivery_cost>
<cpa>0</cpa>
<offers>
{% for product in products %}
<offer id="{{ product.vendor_code }}" available="{{ product.in_stock|yesno:'true,false' }}">
<url>{{ product.utm_url }}</url>
<price>{{ product.price }}</price>
{% if utm != 'priceru' %}<purchase_price>{{ product.purchase_price }}</purchase_price>{% endif %}
<currencyId>RUR</currencyId>
{% include 'prices/pictures.yml' with product=product base_url=base_url only %}
<categoryId>{{ product.category.id }}</categoryId>
<store>false</store>
<pickup>true</pickup>
<delivery>true</delivery>
{% if product.price > shop.local_delivery_cost %}<local_delivery_cost>0</local_delivery_cost>{% endif %}
<name>{{ product.name }}</name>
{% comment "Description in an issue #257" %}
{% if product.page.display_description and not utm == 'GM' %}
<description>{{ product.page.display_description }}</description>
{% endif %}
{% endcomment %}
<description></description>
{% if not utm == 'GM' %}
<sales_notes>При заказе от {{ shop.local_delivery_cost_threshold }} руб. доставка по СПб бесплатно</sales_notes>
{% endif %}
{# product_type tag in google merchant doc : https://goo.gl/b0UJQp #}
{% if utm == 'GM' %}<product_type>{{ product.crumbs }}</product_type>{% endif %}
{% for name, values in product.get_params %}
<param name="{{ name }}">{{ values|first }}</param>
{% endfor %}
</offer>
{% endfor %}
</offers>
</shop>
</yml_catalog>