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

From Spiffy Stores Knowledge Base

Warning: This information is now obsolete and should not be used.

Please refer to Product data feeds for the current information on creating and managing product data feeds.

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 two 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.

You then add the products to this collection that you want to supply to Getprice in your XML feed.

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>
        <PRODUCT_NAME>{{product.title | escape}}</PRODUCT_NAME>
        <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 %}

Including all products automatically

If you wish to automatically generate a data feed for all products in your store, change the code in the second line from

{% for product in collection.products %}

to

{% for product in collections.all.products %}

If you do this, then you do not need to add any products to the collection. All products from your store will be automatically added to the data feed.

STEP 3

Save your Theme.liquid file, and go back to the collections page of your Store Toolbox. Select your new collection called "Getprice Feed", and then preview the collection to make sure that it's working. If you view the source of this page, you will see something that looks like this.

<?xml version="1.0" encoding="ISO-8859-2" ?>
<STORE URL="http://showtime.spiffystores.com" DATE="08/24/10" TIME="08:27:30" NAME="Showtime Theme Store">
  <PRODUCTS>
    <PRODUCT NUM="16174">
      <UPC>ART002</UPC>
      <PRODUCT_NAME>Blue Shirt</PRODUCT_NAME>
      <DESCRIPTION>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</DESCRIPTION>
      <MANUFACTURER>Diesel</MANUFACTURER>
      <CATEGORY_NAME>Mens Jeans</CATEGORY_NAME>
      <AVAILABILITY>Y</AVAILABILITY>
      <PRODUCT_URL>http://showtime.spiffystores.com/products/blue-shirt</PRODUCT_URL>
      <IMAGE>http://asset2.spiffyserver.com/sites/104/products/16174_z05_medium.jpg</IMAGE>
      <PRICE>45.00</PRICE>
      <CURRENCY>AUD</CURRENCY>
    </PRODUCT>     
    <PRODUCT NUM="16166">
      <UPC>ART002</UPC>
      <PRODUCT_NAME>Denim Dress</PRODUCT_NAME>
      <DESCRIPTION>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</DESCRIPTION>
      <MANUFACTURER>Diesel</MANUFACTURER>
      <CATEGORY_NAME>Mens Jeans</CATEGORY_NAME>
      <AVAILABILITY>Y</AVAILABILITY>
      <PRODUCT_URL>http://showtime.spiffystores.com/products/denim-dress</PRODUCT_URL>
      <IMAGE>http://asset0.spiffyserver.com/sites/104/products/16166_z02_medium.jpg</IMAGE>
      <PRICE>85.99</PRICE>
      <CURRENCY>AUD</CURRENCY>
    </PRODUCT>
  </PRODUCTS>
</STORE>

If it all looks correct, your store is now set up to provide your XML product feed at

http://<YOUR STORE ADDRESS>/collections/getprice-feed

You will need to provide the address of this feed to Getprice in order to have them list your products.