Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Google_base


zandory

Recommended Posts

The XML page cannot be displayed

Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.

 

 

--------------------------------------------------------------------------------

 

An invalid character was found in text content. Error processing resource 'http://www.glovertechnology.com/catalog/feeds/go...

 

that's the error i get and here is my code from the contribution, anyone have an idea?

 

BUILD GOOGLE FILE

********************/

 

$output='<?xml version="1.0" encoding="UTF-8" ?>'."\n";

$output.='<rss version="2.0" xmlns:g="http://base.google.com/ns/1.0">'."\n";

$output.='<channel>'."\n";

$output.='<title>'.$feedTitle.'</title>'."\n";

$output.='<description>'.$feedDescription.'</description>'."\n";

$output.='<link>'.$siteUrl.'</link>'."\n";

 

 

while($row = tep_db_fetch_array($result)){

 

$output.=' <item>'."\n";

$output.=' <title>'.xmlentities(strip_tags($row['products_name']). " - " . $row['products_model']) .'</title>'."\n";

$output.=' <description>'.xmlentities(strip_tags($row['products_description']))."</description>\n";

$output.=' <link>'.$productUrl . $row['products_id'] .'</link>'."\n";

$output.=' <g:image_link>'.urlencode($imageUrl . $row['products_image']) .'</g:image_link>'."\n";

$output.=' <guid isPermaLink="false">'.xmlentities($siteUrl.$row['products_id']).'</guid>'."\n";

$output.=' <g:expiration_date>'.get_iso_8601_date(time() + ($ttl * 24 * 60 * 60)).'</g:expiration_date>'."\n";

$output.=' <g:currency>'.$currency.'</g:currency>'."\n";

$output.=' <g:price>'.number_format($row['products_price'], 2, '.', '').'</g:price>'."\n";

$output.=' <g:upc>'.$row['products_model'].'</g:upc>'."\n";

$output.=' <g:quantity>'.$row['products_quantity'].'</g:quantity>'."\n";

foreach($paymentAccepted as $key=>$value){

$output.=' <g:payment_accepted>'.$value.'</g:payment_accepted>'."\n";

}

$output.=' <g:location>'.xmlentities($locationAddress.','.$locationCity.','.$locationState.','.$locationZip.','.$locationCountry).'</g:location>'."\n";

$output.=' </item>'."\n";

}

$output.='</channel>'."\n";

$output.='</rss>'."\n";

 

if ( file_exists( $feedDirectory.$fileGoogle ) )

unlink( $feedDirectory.$fileGoogle );

 

$fp = fopen( $feedDirectory.$fileGoogle , "w" );

$fout = fwrite( $fp , $output );

fclose( $fp );

if(!$dryrun){

$result=ftp_file( $ftp_server, $ftp_user_name, $ftp_user_pass, $feedDirectory.$fileGoogle, $ftp_directory, $destination_file);

}

echo '<a href="'.$feedUrl.$fileGoogle.'">Google File</a>';

}

Link to comment
Share on other sites

Your question should be posted in the Contribution Support thread for the contribution.

 

People knowledgeable with the contribution will be better able to help you and hopefully quicker.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...