Our app needs to be “feeded” with info about the products you want to be available when searching. This is done through an xml or txt file. You have to give this information in the admin panel, setting the url of your feed in the appropriate form or uploading the file to the system.
If you like to, you can use the Google Shopping data feed following their specifications, or you can follow the instructions below:
Which data do we want from the file?
For each product we need to obtain:
- A unique identificator. It can be a number, a string an alphanumeric string… It must be unique for every product.
- Link to the product’s page.
Also, for each product we would love to obtain:
- Image url.
- Category or type.
You can also add whatever fields you want or you consider will be good to make your products more searchable.
How should the file be?
The easiest way is the plain text file, where each line is a product. The first line must specify the name of the fields, and each field must be separated by either a tab or a pip (|) character.
Here’s an example of the first line:
title|link|description|id|price|image link|product type
The special field attributes: if you define a field name with this special name, it will be capable of including dynamic atributes for certain items. Check out this article if you want to read more.
And here an example of a product line (notice that here you see it as multiple lines but it should be a single line in the file):
LG Flatron M2262D 22" Full HD LCD|http://www.example.com/electronics/tv/LGM2262D.html|Attractively styled and boasting stunning picture quality|TV_123456|159 USD|http://images.example.com/TV_123456.png|Consumer Electronics > TVs > Flat Panel TVs
See how the categories are separated by the
>character, beginning with the more general to the more specific one.
The feed file can be compressed in either
If you are going to make use of the faceted search feature see this article.
Below you can download some samples in
More than one category? Right on!
You can specify several category trees for an item. A sports shoe could belong to both the Sports > Clothes > Shoes and Snickers > Jogging, for instance. You can do this with either a xml or txt feed:
- For a XML feed: Just add more than one <
- For a plain text feed: Use the
%%character to indicate another category tree. i.e.:
Sports > Clothes > Shoes %% Snickers> Jogging.