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