{% load satchmo_feed satchmo_util satchmo_product %}<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:g="http://base.google.com/ns/1.0">

	<title>{{ shop.store_name }} Product Feed{% if category %} for {{ category.translated_name }}{% endif %}</title>
	<link rel="self" href="{{ url }}"/>
	<updated>{{ date|atom_date }}</updated>
	<author>
		<name>{{ shop.store_email }}</name>
	</author>
	<id>{{ url|atom_tag_uri }}</id>
{% for product in products %}
<entry>
	<g:id>{{ product.pk }}</g:id>
	<title>{{ product.name }}</title>
	<description>{% if product.description %}{{ product.description|remove_tags }}{% else %}{{ product.productvariation.parent.product.description|remove_tags|default:"No description" }}{% endif %}</description>{% if product.short_description %}
	<summary>{% if product.short_description %}{{ product.short_description|remove_tags }}{% else %}{{ product.productvariation.parent.product.short_description|remove_tags|default:"No description" }}{% endif %}</summary>{% endif %}
	<link href="{{ shop.base_url }}{{ product.get_absolute_url }}" />
	<g:price>{{ product.unit_price|truncate_decimal }}</g:price>
	<g:product_type>{{ product.get_category }}</g:product_type>{% for pic in product.productimage_set.all %}
	<g:image_link>{{ shop.base_url }}{{ pic.picture.url }}</g:image_link>{% endfor %}{% if product.weight %}
	<g:weight>{{ product|smart_attr:"weight"}} {{product|smart_attr:"weight_units" }}</g:weight>{% endif %}{% if product.height %}
	<g:height>{{ product|smart_attr:"height"}} {{product|smart_attr:"height_units" }}</g:height>{% endif %}{% if product.length %}
	<g:length>{{ product|smart_attr:"length"}} {{product|smart_attr:"length_units" }}</g:length>{% endif %}
	{% for payment in payments %}<g:payment_accepted>{% ifequal payment "Google Checkout" %}GoogleCheckout{% else %}{{ payment }}{% endifequal %}</g:payment_accepted>
	{% endfor %}{% if product.productvariation %}{% for opt in product.productvariation.options.all %}
	{{ opt|make_googlebase_option:"false" }}{% endfor %}{% endif %}
	{% for att in product.productattribute_set.all %}
	{{ att|make_googlebase_attribute:"false" }}{% endfor %}
</entry>
{% endfor %}
</feed>
