Hello Since CJ now allows you to create and manage product feeds, and since I had a few people email on how to parse this, I wrote a quick little how to. This will take a XML product feed and parse it via simplexml_load_file() function. This will only be useful for people using PHP5. Parsing XML CJ Product Feeds Anyway, hope it helps someone. hanji
That's pretty cool...! Do you do programming on a freelance basis- I'm looking for something very similar for Wordpress...Script that automatically updates the feed & then posts blog posts at random intervals using custom templates? PM me...
Ok I already fix that problem, the next thing is... how can I deliver the product feed directly to my hosting? I confuse how to set the ftp server.
I'll write up a howto on using PHP's FTP functions to bring the XML file to your hosting account. This might be dependent on your PHP configuration though. hanji
Okay.. I wrote another post on how I FTP files to my server. "FTP'ing files from CJ's FTP server to your host" HTH hanji
Hanji, thanks for the helpful post. I'm a PHP programmer and newbie to CJ. We are developing a website which would integrate CJ, fetch all the categories and merchant data from CJ. We are able to program it. Now we also need to get the transaction data on sales, commission etc from CJ, but as we've opened new account, there is no transaction data in it. So can you please suggest how should we go ahead with it and if there is any way to implement this functionality. Thanks, Swapnil.
Nice easy routine. Just wondered though - I am not really clued up on what the advantage is of using those CJ product feeds. Isn't directly accessing the API more flexible? That's what I did, using some SOAP code (REST not supported by CJ still, I believe) that is available on the CJ dev site - that way you can search the entire product catalogue on lots of criteria any time you want, without having to generate those XML files.
Markowe, thats the same way we fetched the category and merchants information from CJ. Do you have any experience in how to get transaction data from CJ like commission, sales etc using PHP? Thanks in Advance!! Swapnil.
Hi, no, afraid not, I never tried - I didn't really look into it actually. I don't earn enough through CJ to make that worth bothering :/.
Hello I would agree that API in some ways are more flexible. Originally, when I started working with CJ I worked with the CJ API, but was extremely disappointed on performance and reliability. I would get Java errors returned from API call, and on occasion the requests were extremely slow. That's when I started to look for other options and went with the datafeed. With the datafeed, you can increase performance since you'd be querying a local database. Since we're talking raw data, I didn't have to worry about getting oddball SOAP errors from their web service, etc. But, I would also like to say that with my examples, I'm querying a certain subset of data, and the limited information I can retrieve with datafeeds is more than adequate for me. If you need additional information about the advertiser or transactions, etc as others have commented on, then you're only option is to go with the API for that level of information. My goals for my store fronts and CJ, is reliability, speed and ease. That's why I went with datafeeds vs. API. Great question. Thanks! hanji