Product XML feed
An XML feed is a structured document that contains data about a particular ‘ topic’.
To configure an XML feed which contains the details of products in your store you will need to install the product feed app. To do this select INSTALL THIS APP.
from the menu. Find and select the ‘Product Feed’ app and selectYou will then be able to provide this feed to any third party service that needs access to your product information (such as a comparison shopping engine).
Please note!
The feed updates every 24 hours. All of the details about a product, or product variation, are available in the feed.
• Configuring your XML feed
• Feed URL
• Password protection
Configuring your XML feed
To configure your feed select
from the menu. In the ‘Content’ text box configure the contents of your feed:The entire product object is available for you to use.
Remember to ‘close’ any {% if %} statements or {% for %} cycles that you code with an {% endif %} or {% endfor %} closing tag.
You can regenerate the feed by selecting Regenerate Feed in the top right corner of the screen:
Here is an example of some content (mimicking the Google product feed):
<?xml version="1.0"?> <rss xmlns:g="http://base.google.com/ns/1.0" xmlns:c="http://base.google.com/cns/1.0" version="2.0"> <channel> <title>{{ business.name }}</title> <link>{{ business.full_url }}</link> <description>{{ business.description }}</description> {% for product in products %} {% if product.photos|length > 0 %} {% if product.google.has_variations %} {% for variation in product.variations %} {% set description = product.description|striptags %} {% set in_stock = product.google.has_variations ? variation.in_stock : product.in_stock %} {% set weight = product.google.has_variations and variation.weight > 0 ? variation.weight : product.weight %} {% set price_excluding_tax = product.google.has_variations and variation.price_excluding_tax > 0 ? variation.price_excluding_tax : product.price_excluding_tax %} {% set price_including_tax = product.google.has_variations and variation.price_including_tax > 0 ? variation.price_including_tax : product.price_including_tax %} {% set sale_price_excluding_tax = product.google.has_variations and variation.sale_price_excluding_tax > 0 ? variation.sale_price_excluding_tax : product.sale_price_excluding_tax %} {% set sale_price_including_tax = product.google.has_variations and variation.sale_price_including_tax > 0 ? variation.sale_price_including_tax : product.sale_price_including_tax %} {% set price = settings.include_tax ? price_including_tax : price_excluding_tax %} {% set sale_price = settings.include_tax ? sale_price_including_tax : sale_price_excluding_tax %} <item> <link>{{ business.full_url }}{{ product.slug }}</link> <title>{{ (product.title|length > 150 ? (product.title|slice(0, 150) ~ '...') : product.title)|title }}</title> <g:is_bundle>{{ product.google.is_bundle ? 'TRUE' : 'FALSE' }}</g:is_bundle> <g:condition>{{ product.google.condition ? (product.google.condition == 2 ? 'refurbished' : 'used') : 'new' }}</g:condition> <g:availability>{{ product.archived or not in_stock ? 'out of stock' : 'in stock' }}</g:availability> <g:price>{{ price|number_format(2, '.', '') }} {{ business.currency }}</g:price> {% if product.google.has_variations %} <id>{{ product.id }}_{{ variation.id }}</id> {% else %} <id>{{ product.id }}</id> {% endif %} {% if not settings.no_shipping %} {% if product.delivery_cost > 0 %} <g:shipping> <g:service>Delivery</g:service> <g:price>{{ (settings.include_tax ? product.delivery_cost_including_tax : product.delivery_cost_excluding_tax)|number_format(2, '.', '') }}</g:price> </g:shipping> {% elseif product.free_delivery %} <g:shipping> <g:service>Free Delivery</g:service> <g:price>0</g:price> </g:shipping> {% else %} {% set shipping_rate = business.best_shipping_rate(sale_price > 0 ? sale_price : price, weight) %} {% if shipping_rate %} <g:shipping> <g:service>{{ shipping_rate.title }}</g:service> <g:price>{{ (settings.include_tax ? shipping_rate.price_including_tax : shipping_rate.price_excluding_tax)|number_format(2, '.', '') }} {{ business.currency }}</g:price> </g:shipping> {% endif %} {% endif %} {% endif %} {% if sale_price > 0 %} <g:sale_price>{{ sale_price|number_format(2, '.', '') }} {{ business.currency }}</g:sale_price> {% endif %} {% if product.sale and product.sale.to > 0 %} <g:sale_price_effective_date>{{ product.sale.from|date('c') }}/{{ product.sale.to|date('c') }}</g:sale_price_effective_date> {% endif %} {% if product.description %} <description>{{ description|length > 5000 ? (description|slice(0, 5000) ~ '...') : description }}</description> {% endif %} {% for photo in product.photos %} {% set photo_url = photo.url('', true) %} {% if loop.index0 == 0 %} <g:image_link>{{ photo_url }}</g:image_link> {% else %} <g:additional_image_link>{{ photo_url }}</g:additional_image_link> {% endif %} {% endfor %} {% if product.brand_title|length > 0 %} <g:brand>{{ product.brand_title|length > 70 ? (product.brand_title|slice(0, 70) ~ '...') : product.brand_title }}</g:brand> {% endif %} {% if product.google.no_identifier %} <g:identifier_exists>FALSE</g:identifier_exists> {% else %} {% set gtin = variation.gtin ? variation.gtin : product.gtin %} <g:identifier_exists>{{ gtin|length > 0 or product.mpn|length > 0 ? 'TRUE' : 'FALSE' }}</g:identifier_exists> {% if gtin|length > 0 %} <g:gtin>{{ gtin|length > 50 ? (gtin|slice(0, 50) ~ '...') : gtin }}</g:gtin> {% endif %} {% if product.mpn|length > 0 %} <g:mpn>{{ product.mpn|length > 70 ? (product.mpn|slice(0, 70) ~ '...') : product.mpn }}</g:mpn> {% endif %} {% endif %} {% if weight > 0 %} <g:shipping_weight>{{ weight }} {{ business.weight_unit }}</g:shipping_weight> {% endif %} {% if product.google.category_id > 0 %} <g:google_product_category>{{ product.google.category_id }}</g:google_product_category> {% endif %} {% for name, value in product.google.attributes %} {% if name == 'color' %} <g:color>{{ product.google.has_variations ? variation.google_color|default(value) : value }}</g:color> {% elseif name == 'size' %} <g:size>{{ product.google.has_variations ? variation.google_size|default(value) : value }}</g:size> {% else %} {{ ('<g:' ~ name ~ '>')|raw }}{{ value }}{{ ('</g:' ~ name ~ '>')|raw }} {% endif %} {% endfor %} {% if product.google.has_variations %} <g:item_group_id>{{ product.id }}</g:item_group_id> {% if variation.sku or product.sku %} <c:sku type="string">{{ variation.sku ? variation.sku : product.sku }}</c:sku> {% endif %} {% elseif product.sku %} <c:sku type="string">{{ product.sku }}</c:sku> {% endif %} {% for breadcrumbs in product.breadcrumbs|slice(0, 3) %} <g:product_type>{% for breadcrumb in breadcrumbs %}{{ loop.first ? '' : ' > ' }}{{ breadcrumb.name }}{% endfor %}</g:product_type> {% endfor %} </item> {% endfor %} {% else %} {% set description = product.description|striptags %} {% set in_stock = product.google.has_variations ? variation.in_stock : product.in_stock %} {% set weight = product.google.has_variations and variation.weight > 0 ? variation.weight : product.weight %} {% set price_excluding_tax = product.google.has_variations and variation.price_excluding_tax > 0 ? variation.price_excluding_tax : product.price_excluding_tax %} {% set price_including_tax = product.google.has_variations and variation.price_including_tax > 0 ? variation.price_including_tax : product.price_including_tax %} {% set sale_price_excluding_tax = product.google.has_variations and variation.sale_price_excluding_tax > 0 ? variation.sale_price_excluding_tax : product.sale_price_excluding_tax %} {% set sale_price_including_tax = product.google.has_variations and variation.sale_price_including_tax > 0 ? variation.sale_price_including_tax : product.sale_price_including_tax %} {% set price = settings.include_tax ? price_including_tax : price_excluding_tax %} {% set sale_price = settings.include_tax ? sale_price_including_tax : sale_price_excluding_tax %} <item> <link>{{ business.full_url }}{{ product.slug }}</link> <title>{{ (product.title|length > 150 ? (product.title|slice(0, 150) ~ '...') : product.title)|title }}</title> <g:is_bundle>{{ product.google.is_bundle ? 'TRUE' : 'FALSE' }}</g:is_bundle> <g:condition>{{ product.google.condition ? (product.google.condition == 2 ? 'refurbished' : 'used') : 'new' }}</g:condition> <g:availability>{{ product.archived or not in_stock ? 'out of stock' : 'in stock' }}</g:availability> <g:price>{{ price|number_format(2, '.', '') }} {{ business.currency }}</g:price> {% if product.google.has_variations %} <id>{{ product.id }}_{{ variation.id }}</id> {% else %} <id>{{ product.id }}</id> {% endif %} {% if not settings.no_shipping %} {% if product.delivery_cost > 0 %} <g:shipping> <g:service>Delivery</g:service> <g:price>{{ (settings.include_tax ? product.delivery_cost_including_tax : product.delivery_cost_excluding_tax)|number_format(2, '.', '') }}</g:price> </g:shipping> {% elseif product.free_delivery %} <g:shipping> <g:service>Free Delivery</g:service> <g:price>0</g:price> </g:shipping> {% else %} {% set shipping_rate = business.best_shipping_rate(sale_price > 0 ? sale_price : price, weight) %} {% if shipping_rate %} <g:shipping> <g:service>{{ shipping_rate.title }}</g:service> <g:price>{{ (settings.include_tax ? shipping_rate.price_including_tax : shipping_rate.price_excluding_tax)|number_format(2, '.', '') }} {{ business.currency }}</g:price> </g:shipping> {% endif %} {% endif %} {% endif %} {% if sale_price > 0 %} <g:sale_price>{{ sale_price|number_format(2, '.', '') }} {{ business.currency }}</g:sale_price> {% endif %} {% if product.sale and product.sale.to > 0 %} <g:sale_price_effective_date>{{ product.sale.from|date('c') }}/{{ product.sale.to|date('c') }}</g:sale_price_effective_date> {% endif %} {% if product.description %} <description>{{ description|length > 5000 ? (description|slice(0, 5000) ~ '...') : description }}</description> {% endif %} {% for photo in product.photos %} {% set photo_url = photo.url('', true) %} {% if loop.index0 == 0 %} <g:image_link>{{ photo_url }}</g:image_link> {% else %} <g:additional_image_link>{{ photo_url }}</g:additional_image_link> {% endif %} {% endfor %} {% if product.brand_title|length > 0 %} <g:brand>{{ product.brand_title|length > 70 ? (product.brand_title|slice(0, 70) ~ '...') : product.brand_title }}</g:brand> {% endif %} {% if product.google.no_identifier %} <g:identifier_exists>FALSE</g:identifier_exists> {% else %} {% set gtin = variation.gtin ? variation.gtin : product.gtin %} <g:identifier_exists>{{ gtin|length > 0 or product.mpn|length > 0 ? 'TRUE' : 'FALSE' }}</g:identifier_exists> {% if gtin|length > 0 %} <g:gtin>{{ gtin|length > 50 ? (gtin|slice(0, 50) ~ '...') : gtin }}</g:gtin> {% endif %} {% if product.mpn|length > 0 %} <g:mpn>{{ product.mpn|length > 70 ? (product.mpn|slice(0, 70) ~ '...') : product.mpn }}</g:mpn> {% endif %} {% endif %} {% if weight > 0 %} <g:shipping_weight>{{ weight }} {{ business.weight_unit }}</g:shipping_weight> {% endif %} {% if product.google.category_id > 0 %} <g:google_product_category>{{ product.google.category_id }}</g:google_product_category> {% endif %} {% for name, value in product.google.attributes %} {% if name == 'color' %} <g:color>{{ product.google.has_variations ? variation.google_color|default(value) : value }}</g:color> {% elseif name == 'size' %} <g:size>{{ product.google.has_variations ? variation.google_size|default(value) : value }}</g:size> {% else %} {{ ('<g:' ~ name ~ '>')|raw }}{{ value }}{{ ('</g:' ~ name ~ '>')|raw }} {% endif %} {% endfor %} {% if product.google.has_variations %} <g:item_group_id>{{ product.id }}</g:item_group_id> {% if variation.sku or product.sku %} <c:sku type="string">{{ variation.sku ? variation.sku : product.sku }}</c:sku> {% endif %} {% elseif product.sku %} <c:sku type="string">{{ product.sku }}</c:sku> {% endif %} {% for breadcrumbs in product.breadcrumbs|slice(0, 3) %} <g:product_type>{% for breadcrumb in breadcrumbs %}{{ loop.first ? '' : ' > ' }}{{ breadcrumb.name }}{% endfor %}</g:product_type> {% endfor %} </item> {% endif %} {% endif %} {% endfor %} </channel> </rss>
Please contact us if you need assistance with configuring your XML feed.
Feed URL
To access the URL for your feed select
from the menu. Your URL will show in the ‘Product Feed’ box:Password protection
On the ‘Feed URLs’ page you can also choose whether or not you want your feed to be password protected. Use the tick box to make this choice:
If you choose to use a password make sure you have set a username and password in the ‘Feed Protection’ box at the top of the page: