How to create an XML feed for getprice.com.au

From Spiffy Stores Knowledge Base

Revision as of 09:06, 24 August 2010 by Shawn (talk | contribs)

Getprice.com.au is Australia's leading comparison shopping destination. They reach more than 3 million genuine buyers every month. Getprice has joined forces with some of Australia's largest media networks, online and offline, which enables them to distribute your inventory to millions of Australians via one simple XML feed.

All Getprice merchants need to supply Getprice with a data feed in a specific format, that includes all the relevant information on their product lines. If you supply Getprice with a dynamic (automatic) feed, they can scan this every 24 hours or so for product and price updates.

For more information about the Getprice Merchant Program, visit the getprice site at http://www.getprice.com.au/join.htm


Setting up your store to create the feed

To create a feed for the getprice.com.au site, you'll need to do 2 things;

1. Create a new collection that contains all of the products you want to include in your product feed

2. Edit your Theme.liquid file in your store toolbox

STEP 1

Create a collection in your Spiffy Toolbox called "getprice feed". Make sure it called exactly that. The collection you create can be either a standard collection, or a super collection... it doesn't matter which.


STEP 2

Paste the code below into your theme.liquid file so it's ABOVE THE FIRST LINE that appears in the editor;

{% if collection.handle == 'getprice-feed' %}
<?xml version="1.0" encoding="ISO-8859-2" ?>
<STORE URL="{{shop.url}}" DATE="{{  'now' | date: '%x' }}" TIME="{{  'now' | date: '%X' }}" NAME="{{shop.name}}">
  <PRODUCTS>
    {% for product in collection.products %} 
      <PRODUCT NUM="{{ product.id }}">
        <UPC>{{product.variants.first.sku}}</UPC>
        <ATTRIBUTE1>{{product.title | escape}}</ATTRIBUTE1>
        <description>{{product.description | strip_html | escape | truncate: 1024}}</description>
        <manufacturer>{{product.vendor | escape}}</manufacturer>
        <category_name>{{product.type | escape}}</category_name>
        <AVAILABILITY>{% if product.available %}Y{% else %}N{% endif %}</AVAILABILITY>
        <PRODUCT_URL>{{shop.url}}{{product.url}}</PRODUCT_URL>
        <IMAGE>{{product.featured_image | product_img_url: 'medium'}}</IMAGE>
        <PRICE>{{product.price | money_without_currency}}</PRICE>
        <CURRENCY>{{ shop.currency }}</CURRENCY>
      </PRODUCT>
    {% endfor %}
  </PRODUCTS>
</STORE>
{% else %}

Paste this so it's BELOW THE LAST line in your theme.liquid file

{% endif %}