Skip to main content

RSS item empty with Commission Junction CSV file

More
9 years 4 months ago #3393 by Chris
Hi,

I'm trying to use a CSV File from CJ. Here is the header :
Code:
"PROGRAMNAME","PROGRAMURL","CATALOGNAME","LASTUPDATED","NAME","KEYWORDS","DESCRIPTION","SKU","MANUFACTURER","MANUFACTURERID","UPC","ISBN","CURRENCY","SALEPRICE","PRICE","RETAILPRICE","FROMPRICE","BUYURL","IMPRESSIONURL","IMAGEURL","ADVERTISERCATEGORY","THIRDPARTYID","THIRDPARTYCATEGORY","AUTHOR","ARTIST","TITLE","PUBLISHER","LABEL","FORMAT","SPECIAL","GIFT","PROMOTIONALTEXT","STARTDATE","ENDDATE","OFFLINE","ONLINE","INSTOCK","CONDITION","WARRANTY","STANDARDSHIPPINGCOST"

datafeed2rss give me a RSS file but each item is empty. I tried with a ungzip file upload on my server with same results.

Here is the configuration file :
Code:
<? $feed_opts=array ( 'feed' => 'Guitar Center', # descriptive name of your feed ( shown in the rss feed 'feed_url' => 'https://XXXXXX:YYYYYYY@datatransfer.cj.com/datatransfer/files/XXXXX/outgoing/productcatalog/ZZZZZ/Guitar_Center-International_Products.txt.gz', # the affiliate feed url 'class' => 'CJCSV', # the parser class 'merchant_description' => 'GuitarCenter', # description of the feed merchant used in the rss feed 'merchant_url' => 'https://guitarcenter.com', # (affiliate link) to the merchant 'merchant_img' => 'https://guitarcenter.com/logo_50x50.jpg', # not used in datafeeds 2 rss 'title' => 'name', # The field in the affiliate field containing the title of the item 'href' => 'buyurl', # The field containing the deeplink to the item 'image' => 'imageurl', # The field containing the image of theitem 'prijs' => 'price', # The field containing the price of the item 'menu_1' => 'advertisercategory', # A field that should be mapped to the <category> 'menu_2' => '', # A field that should be mapped to the <category> 'menu_3' => '', # A field that should be mapped to the <category> 'menu_4' => '', # A field that should be mapped to the <category> 'menu_5' => '', # A field that should be mapped to the <category> 'menu_6' => '', # A field that should be mapped to the <category> 'menu_7' => '', # A field that should be mapped to the <category> 'menu_8' => '', # A field that should be mapped to the <category> 'menu_9' => '', # A field that should be mapped to the <category> 'callback' => 'generic_cb', # A optional function for convering data 'input_encoding' => 'UTF-8',# Seeing weird character, try to set input encoding to ISO-8859-1 'detect_encoding' => '1', # and/or detect_encoding to 0 'freq' => '240000', # interval between download of the feeds 'list_1' => '', 'list_2' => '', 'list_3' => '', 'list_4' => '', 'list_5' => '', 'text_1' => '', 'text_2' => '', 'text_3' => '', 'text_4' => '', 'text_5' => '', );

And the parser in xml_fetch.inc file :
Code:
class CJCSV extends AffiliateCSV { function TradedoublerCSV ($url, $output_encoding='ISO-8859-1', $input_encoding=null, $detect_encoding=true,$callback='noop',$store_items=true) { $this->callback=$callback; $this->url=$url; $this->input_encoding=$input_encoding; $this->store_items=$store_items; $this->delimiter =","; $this->enclosure ='"'; $this->escape ='\\"'; $this->header=true; if ( $input_encoding == 'UTF-8' && $output_encoding == 'ISO-8859-1' ) { $this->decode=true; } $this->_parse(); } }

Could you please say me where is my mistake.

Thanks in advance.

Chris

Please Log in to join the conversation.

More
9 years 4 months ago #3395 by redactie
Hi,

i'm not part of CJ at the moment, could you attach or send me the csv file, a part is enough say the top 50 rows, with header of course

Please Log in to join the conversation.

More
9 years 4 months ago #3396 by Chris
Here is the file

File Attachment:

File Name: Guitar_Cen...ucts.txt
File Size:29 KB


Thanks
Attachments:

Please Log in to join the conversation.

More
9 years 4 months ago - 9 years 4 months ago #3397 by redactie
should have looked better the first time.

the name of the constructor function must be the same as the class.

The class WebgainsCSV should work the same

class CJCSV extends AffiliateCSV {
function [strike]TradedoublerCSV[/strike] CJCSV
Last edit: 9 years 4 months ago by redactie.

Please Log in to join the conversation.

More
9 years 4 months ago #3398 by Chris
Sorry for my stupid mistake but unfortunately it's not resolve my problem. I've tried first with WebgainsCSV and when I've see empty RSS, I've create the new class with error. But after correction, always empty item in RSS like this :
Code:
<item> <title></title> <link><![CDATA[]]></link> <description><![CDATA[<div class="datafeeds"><a href="" target="_blank" rel="nofollow" ><img class="datafeeds alignleft" src="" alt="" /></a><p class="df_description"><p></p></p></div>]]></description> <guid isPermaLink="false"><![CDATA[1 ]]></guid> <pubDate>Thu, 30 Oct 2014 09:40:15 GMT</pubDate> </item>

Chris

Please Log in to join the conversation.

More
9 years 4 months ago #3399 by redactie
try clearing the cache dir

Please Log in to join the conversation.

Time to create page: 0.687 seconds