How to create an XML feed for shopping.com

From Spiffy Stores Knowledge Base

Revision as of 11:03, 24 August 2010 by Shawn (talk | contribs)

Shopping.com, an eBay® company, pioneered online comparison shopping and today is consistently the leading online comparison site because of its comprehensive set of products from thousands of trusted stores from across the Web.

With an average of 20 million unique visitors each month, Shopping.com offers shoppers easy-to-use search tools, engaging content, and time saving navigation, along with millions of unbiased product and merchant reviews from Epinions.com community, all in one place.

For more information about the Shopping.com Merchant Program, visit the Shopping.com site at https://au.merchant.shopping.com/enroll/app?service=page/PartnerWelcome


Setting up your store to create the feed

To create a feed for the Shopping.com 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 "Shopping.com 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 Shopping.com 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 == 'shoppingcom-feed' %}<?xml version="1.0" encoding="ISO-8859-2" ?>
<products>{% for product in collection.products %}   
  <product>
    <merchant_sku>{{product.variants.first.sku}}</merchant_sku>
    <product_name>{{product.title | escape}}</product_name>
    <product_description>{{product.description | strip_html | escape | truncate: 4000}}</product_description>
    <manufacturer>{{product.vendor | escape}}</manufacturer>
    <Current_Price>{{product.price | money_without_currency}}</Current_Price>
    <Original_Price>{{product.compare_at_price | money_without_currency}}</Original_Price> 
    <price>{{product.price | money_without_currency}}</price>
    <stock>{% if product.available %}Y{% else %}N{% endif %}</stock>
    <Product_URL>{{shop.url}}{{product.url}}</Product_URL>
    <Image_URL>{{product.featured_image | product_img_url: 'medium'}}</Image_URL>
    <Product_Type>{{product.type | escape}}</Product_Type>
    <Condition>New</Condition>
  </product>{% endfor %}
</products>{% 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 "Shopping.com 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" ?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<products>   
  <product>
    <merchant_sku>ART002</merchant_sku>
    <product_name>Blue Shirt</product_name>
    <product_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.</product_description>
    <manufacturer>Diesel</manufacturer>
    <Current_Price>45.00</Current_Price>
    <Original_Price>0.00</Original_Price> 
    <price>45.00</price>
    <stock>Y</stock>
    <Product_URL>http://showtime.spiffystores.com/products/blue-shirt</Product_URL>
    <Image_URL>http://asset2.spiffyserver.com/sites/104/products/16174_z05_medium.jpg</Image_URL>
    <Product_Type>Mens Jeans</Product_Type>
    <Condition>New</Condition>
  </product>   
  <product>
    <merchant_sku>ART002</merchant_sku>
    <product_name>MENS JEANS</product_name>
    <product_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.</product_description>
    <manufacturer>Diesel</manufacturer>
    <Current_Price>85.99</Current_Price>
    <Original_Price>0.00</Original_Price> 
    <price>85.99</price>
    <stock>Y</stock>
    <Product_URL>http://showtime.spiffystores.com/products/mens-jeans</Product_URL>
    <Image_URL>http://asset3.spiffyserver.com/sites/104/products/8543_z16_medium.jpg</Image_URL>
    <Product_Type>Mens Jeans</Product_Type>
    <Condition>New</Condition>	
  </product>   
</products>
</rss>

If it all looks correct, your store is now set up to provide your XML product feed at
<YOUR STORE ADDRESS>/collections/shoppingcom-feed

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