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

From Spiffy Stores Knowledge Base

Revision as of 09:18, 24 August 2010 by Shawn (talk | contribs) (→‎STEP 3)

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.

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>
        <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 %}

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>
        <ATTRIBUTE1>Blue Shirt</ATTRIBUTE1>
        <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>
        <ATTRIBUTE1>Denim Dress</ATTRIBUTE1>
        <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
<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.