Jump to content
gottaloveit

Automatically send data feed to Froogle

Recommended Posts

when I installed and run

 

it appear the follow error message.

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/buystation/www/www/buystationhk/catalog/admin/froogle.php on line 165

 

any solutions?

tks a lot~ :P

Share this post


Link to post
Share on other sites

GREAT CONTRIB!!!!

 

One small problem I am finding is there appears to be tabs present in my product descriptions. If I try importing the tabbed file using excel after a few products they are out of sync....

 

I know google supports other delimitations such as "Tilde (~)" is it possible to get the feeder to use one of these as they are less likely to be contained with my descriptions...

 

Chrs & thanks again!

 

Rich

Share this post


Link to post
Share on other sites

hmm... that means you have \t in your product descriptions... that show up when you view those products online? i've actually thought about it, and your the first one after almost a year to have that problem. i'll try to add support after my midterms next week.

 

wait... i just noticed you say it's that way in excel. does it affect the upload to froogle?

Edited by FlyingMonkey

Most likely your question has been answered, please do a search first.

Share this post


Link to post
Share on other sites

please send me a link to you feed...

 

i just tried a quick test with a \t in my product descriptions and everything works fine.

 

as a temporary solution, you can try adding the \t to the cleaner array so it looks like.

 

$_cleaner_array = array(">" => "> ", "®" => "", "?" => "", "™" => "", "?" => "", "\t" => " ");


Most likely your question has been answered, please do a search first.

Share this post


Link to post
Share on other sites

infact to look at it the culprit appears to be the term "features" its all of my descriptions with this phrase in it which are screwed...

 

the html is:

 

</div>
 <div class="SubCategory">
	 Features and benefits</div>
 <div class="ProductDescription">
	 <ul>
   <li>Revolutionary Drawing Organization Features </li>

Share this post


Link to post
Share on other sites

looks fine in ie6, but doesn't open in other text editors because it contains characters that are not in the code page 1251 (ANSI - Latin I). it'll probably load just fine into Froogle, even it excel can't open it.

 

This should fix it: (I've updated it)

 

$_cleaner_array = array(">" => "> ", "®" => "", "?" => "", "™" => "", "?" => "", "\t" => " ", "	" => " ");

 

the last one contains a " " tab. You may have to put in the tab yourself, it can't copy and paste.

Edited by FlyingMonkey

Most likely your question has been answered, please do a search first.

Share this post


Link to post
Share on other sites

hi all, i have just about no programming skills and i haven't been using osc that long so i'm sure this is an ID10T error on my part, but hopefully someone can help me out on this. i've installed everything and when i run froogle.php this is what i get:

Warning: fopen(http://www.danowcorp.com/froogle/danowcorp_feed.txt): failed to open stream: HTTP wrapper does not support writeable connections. in /home/danowcor/public_html/admin/froogle.php on line 301

Warning: fwrite(): supplied argument is not a valid stream resource in /home/danowcor/public_html/admin/froogle.php on line 302

Warning: fclose(): supplied argument is not a valid stream resource in /home/danowcor/public_html/admin/froogle.php on line 303
File completed: danowcorp_feed.txt

Warning: chmod(): No such file or directory in /home/danowcor/public_html/admin/froogle.php on line 305

Script timer: 0.048244 seconds.

now i know this is probably tellin me that i need to 777 the froogle dir and danowcorp_feed.txt. only thing is, they are already set with those permissions!? i had originally made the folder feeds, but got the same error so i thought it may need to be froogle. any help is much appreciated. if u need more info lemme know. thx

 

 

EDIT: btw i did read thru as much of this thread as i could, saw a few similar questions but they fixed it with chmod, but its just not doin it for me. also, the forum search sucks. lol

Edited by chad@danow

Share this post


Link to post
Share on other sites

#300
#301$fp = fopen( $OutFile , "a" ); 	 
#302$fout = fwrite( $fp , $output ); 	 
#303fclose( $fp ); 	 
#304echo "File completed: <a href=\"" . $OutFile . "\"	target=\"_blank\">" .     
    $destination_file . "</a><br>\n";
#305chmod($OutFile, 0777); 	 
#306
#307/* 	 
#308//Start FTP to Froogle 	 
#309
#310function ftp_file( $ftpservername, $ftpusername, $ftppassword,                     $ftpsourcefile, $ftpdirectory, $ftpdestinationfile )

i had to open froogle.php in excel because i don't have another program that gives line #'s but thats what was there which would seem to me that it is accurate.

Share this post


Link to post
Share on other sites

it isn't in the admin section, i think, lol. the full ftp path to it is /home/public_html/froogle/, not /home/public_html/admin/froogle/

not totally sure what u mean by catalog section, i'm assuming /public_html/ is what ur talkin about?

 

froogle.php is located at /home/public_html/admin/froogle.php, which is correct

like i said, not a programmer.lol

Share this post


Link to post
Share on other sites

It appears that you have $OutFile defined incorrectly. This needs to be the path from your froogle.php to the directory that you want the file stored in. This should be something like:

$OutFile = "../froogle/danowcorp.txt"; //"CHANGEME-full-path-to-file-with-777-dir-and-file-permissions.fr-outfile.txt";

 

Provided I've read your paths from your previous posts correctly, this should work. Please post again if you're still having problems.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

that was it kymation, thx. so siimple yet, what a pain. the help file, or at least the one i have, doesn't say it needs the path from the froogle.php, i interpreted it as full path from web.

 

aspiringarts - heres the link to the merchant center - https://www.google.com/froogle/merchants/home

or go to froogle.com and click on "information for merchants" on the bottom. just add it to your favorites.

Share this post


Link to post
Share on other sites
aspiringarts - heres the link to the merchant center - https://www.google.com/froogle/merchants/home

or go to froogle.com and click on "information for merchants" on the bottom. just add it to your favorites.

Thanks. The full path you gave me works (I didn't have it), but the link to "information for merchants," which is http://www.google.com/froogle/merchants/ , comes up with a 403 error ever since Monday, when I think they messed it up when changing to a Valentine's Day theme. Thank you!

 

Susan

Share this post


Link to post
Share on other sites

Since we're still under "tips and tricks", here's a trick:

 

I was getting an error when trying to FTP the file to google:

Fatal error: Call to undefined function: ftp_connect() in /usr/www/users/adssinc/screwpost/froogle.php on line 179
A bit of checking found that my hosting service didn't provide the FTP functions. However, they did provide libcurl, and I was able to make that work. So, if you are getting the above error message, check to see if you have libcurl. Check your Admin > Tools > Server Info for a curl section. If it's there, this should work.

 

First, of course, comment out the FTP section of the Froogle updater. That's the section near the bottom that's commented out in the original code. Now add the following code just above the commented-out FTP code:

  $timeout = 60;
 $size = filesize($OutFile);
 $ftp_server = 'ftp://' . $ftp_server . ':21/' . $destination_file;

 $fp = fopen($OutFile, "r");

 $ch = curl_init();
 curl_setopt($ch, CURLOPT_URL, $ftp_server);
 curl_setopt($ch, CURLOPT_INFILE, $fp);
 curl_setopt($ch, CURLOPT_INFILESIZE, $size);
 curl_setopt($ch, CURLOPT_VERBOSE, 0);
 curl_setopt($ch, CURLOPT_UPLOAD, 1);
 curl_setopt($ch, CURLOPT_USERPWD, $ftp_user_name . ':' . $ftp_user_pass);
 curl_setopt($ch, CURLOPT_TIMEOUT, (int)$timeout);

 $ftp = curl_exec ($ch);
 if (curl_errno($ch)) {
   $error_from_curl = sprintf('Error [%d]: %s', curl_errno($ch), curl_error($ch));
//    print $error_from_curl;
 }
//  print "<pre>";
//  print_r(curl_getinfo($ch)); 
//  print "\n\n cURL error number:" .curl_errno($ch); 
//  print "\n\n cURL error:" . curl_error($ch); 
//  print "</pre>";
 curl_close ($ch);
 fclose($fp);

 

If you are having problems, uncomment the Print commands near the bottom. You may also want to set CURLOPT_VERBOSE to 1. This should tell you everything that's going on with the transfer.

 

Hope this helps somebody else.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

You certainly may. Since you did all the work to make this available in the first place, I'm happy to add my little bit to it.

 

Thank you for taking the time to create this Contribution.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites
Since we're still under "tips and tricks", here's a trick:

 

I was getting an error when trying to FTP the file to google:

A bit of checking found that my hosting service didn't provide the FTP functions. However, they did provide libcurl, and I was able to make that work. So, if you are getting the above error message, check to see if you have libcurl.  Check your Admin > Tools > Server Info for a curl section. If it's there, this should work.<snip>

 

Perfect timing, Jim! I was actually having just this error - - found another way around it using some other FTP commands that I have in a backup script I pieced together. I'll round those up and post them here as well.

 

-jared

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×