You are here:  » How to create feed

Support Forum



How to create feed

Submitted by cq on Sat, 2009-06-20 08:14 in

Hi David,

I am wondering if PT can get direct feed without affiliate. For example how can I get the info from {link saved} to put in on my site.

regards
Jack

p/s. pls hide the url. thanks

Submitted by support on Sat, 2009-06-20 10:08

Hello Jack,

You can create your own feed quite easily using a spreadsheet program like Microsoft Excel, or even just a plain old text editor if you want.

With a spreadsheet, create column headings in the first row:

Product Name
Description
Image URL
Buy URL
Price
Category
Brand

And then on the subsequent rows, just enter the values in each column for the products you want to manually add to your site. Then, use the spreadsheet's "Export" function (File menu) to save the spreadsheet as a CSV (comma separated values) file, ending in .csv. That file you can then upload to your Price Tapestry site and register / import the feed as normal!

Alternatively, just to create the CSV file in a text editor, it's as simple as:

Product Name,Description,Image URL,Buy URL,Price,Category,Brand
Widget,Really good widget!,http://www.example.com/images/1.jpg,http://www.example.com/product.asp?id=1&affiliate=1234,9.99,Gadgets,WidgetCo

Cheers,
David.

Submitted by cq on Sun, 2009-06-21 04:00

Hi David,

I tried to use the text editor version and it works fine. However I need some explanation from your goodself.

1. In the buy url, what is id=1 stand for as well as affiliate=1234. Is it id=1 refer to the product and affiliate=1234 represent the merchant.

2. Can we use the alpha for the affiliate rather than numeric 1234.

3. Is it possible to have different currency. I mean using multiple currency. By default in config it is using USD. Cause some merchants may use localize currency and some using USD.

4. The entire product description is in one field. Can we break it into line by line instead of one whole paragraph.

5. Is it possible to have more than one image for each product.

Having said that its really nice that PT can enable us to create our own feed. Superb man.

Hope to hear from you.

thanks
jack

Submitted by support on Mon, 2009-06-22 07:31

Hi,

> 1. In the buy url, what is id=1 stand for as well as affiliate=1234.
> Is it id=1 refer to the product and affiliate=1234 represent the merchant.

That was just an example Buy URL - all you need to use is your actual affiliate
URL for the products you are adding to your manually created feed...

> 2. Can we use the alpha for the affiliate rather than numeric 1234.

As above - that purely for example purposes - just use your actual affiliate URL

> 3. Is it possible to have different currency. I mean using multiple currency.
> By default in config it is using USD. Cause some merchants may use
> localize currency and some using USD.

As the script is designed to compare prices they are all expected to be the same
currency. If you are featuring merchants with different currencies, I would
strongly recommend separate installations - perhaps in sub-directories for
the country / currency concerned; for example:

http://www.yoursite.com/comparisonUK/ (for UK / GBP merchants)
http://www.yoursite.com/comparisonUSA/ (for US / USD merchants)

> 4. The entire product description is in one field. Can we break it into line
by line instead of one whole paragraph.

Whilst it has to be included on one line (i.e. one field) in the feed that you create, I would use HTML to split it into paragraphs, for example:

<p>This is description paragraph 1</p><p>This is description paragraph 2</p>

..and then make a small modification to the import record handler to permit HTML in the description field. To do this, look for the following code in includes/admin.php starting at line 161:

    if ($admin_importFeed["field_description"])
    {
      $record[$admin_importFeed["field_description"]] = strip_tags($record[$admin_importFeed["field_description"]]);
      $record[$admin_importFeed["field_description"]] = tapestry_normalise($record[$admin_importFeed["field_description"]],",'\'\.%!");
    }

...and simply comment out or delete that block. That will leave the description field unmodified and your paragraphs would then be displayed.

> 5. Is it possible to have more than one image for each product.

You could certainly add more image fields to your database - simply follow the instructions in this thread (based on the example tariff) and then add, fields for example image2_url, image3_url etc. Then, you can display them throughout the /html/ files in exactly the same way as the original, main image_url field. For example, just search html/product.php for "image_url", and copy the section of code but replacing "image_url" with your additional image fields, e.g. "image2_url"...

Hope this helps!
Cheers,
David.