How to create an XML feed for myshopping.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.

MyShopping.com.au is Australia's leading online comparison shopping website and is consistently leading the online shopping market today because of the wide range of products from thousands of its trusted online stores. With over 2 million unique visitors each month, MyShopping.com.au allows shoppers to save time, money and effort by using our easy-to-use search tools, search content, and unbiased product and merchant reviews.

For more information about the MyShopping.com.au Merchant Program, visit the MyShopping.com.au site at http://www.myshopping.com.au/2B--joinus

Setting up your store to create the feed

To create a feed for the myshopping.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 "MyShopping.com.au 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 MyShopping.com.au 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 == 'myshoppingcomau-feed' %}<?xml version="1.0" encoding="UTF-8" ?>
<productset>{% for product in collection.products %}   
  <product>
    <Code>{{product.id}}</Code>
    <Name>{{product.title | escape}}</Name>
    <Description>{{product.description | strip_html | escape | truncate: 255}}</Description>
    <Category xml:space="preserve">{{product.type | escape}}</Category>
    <Price>{{product.price | money_rounded}}</Price>
    <Product_URL>{{shop.url}}{{product.url}}</Product_URL>
    <Image_URL>{{product.featured_image | product_img_url: 'medium'}}</Image_URL>
    <Brand>{{product.vendor | escape}}</Brand>
    <InStock>{% if product.available %}Y{% else %}N{% endif %}</InStock>
  </product>{% endfor %}
</productset>{% 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 collectiona.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 "MyShopping.com.au 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="UTF-8" ?>
<productset>   
  <product>
    <Code>8569</Code>
    <Name>MENS BLUE JEANS</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...</Description>
    <Category xml:space="preserve">Mens Jeans</Category>
    <Price>86</Price>
    <Product_URL>http://showtime.spiffystores.com/products/mens-blue-jeans</Product_URL>
    <Image_URL>http://asset3.spiffyserver.com/sites/104/products/8569_z03_medium.jpg</Image_URL>
    <Brand>Diesel</Brand>
    <InStock>Y</InStock>
  </product>   
  <product>
    <Code>8600</Code>
    <Name>Jeans and a Shirt</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...</Description>
    <Category xml:space="preserve">Mens Jeans</Category>
    <Price>86</Price>
    <Product_URL>http://showtime.spiffystores.com/products/jeans-and-a-shirt</Product_URL>
    <Image_URL>http://asset1.spiffyserver.com/sites/104/products/8600_z25_medium.jpg</Image_URL>
    <Brand>Diesel</Brand>
    <InStock>Y</InStock>
  </product>
</productset>

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

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

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