Hallo!
Ich habe vor kurzem die google_rss_feed_de.php bei google erfolgreich hochgeladen.
Leider sagt mir google das dass Attribute Preis bei allen produkten fehlt. Schaut euch den Screenshot im Anhang an. Ohne die fehlenden Attribute stellt google die Produkte NICHT in google-base ein. Ich denke das erklärt alles.
Dies ist der vollständige Quellcode der google_rss_feed_de.php Datei:
PHP
<?php
/*
*
* Copyright 2009 - xt-Shopservice.de
* ein Projekt von webdesign-erfurt.de
*
* Daniel Siekiera - Stand 29.06.2009
*
*/
include ('includes/configure.php');
include ('includes/application_top.php');
$Title = "Produkt Feed von " . HTTP_SERVER;
$SiteLink = HTTP_SERVER .DIR_WS_CATALOG ;
if (GROUP_CHECK == 'true') {
$group_check = " and p.group_permission_".$_SESSION['customers_status']['customers_status_id']."=1 ";
}
$query = "select
p.products_id,
p.products_ean,
pd.products_name,
pd.products_short_description,
p.products_price,
p.products_image,
p.products_model,
p.products_zustand,
p.group_permission_1,
p.products_date_added,
p.products_tax_class_id,
s.specials_new_products_price
from (products p INNER JOIN products_description pd ON p.products_id = pd.products_id) LEFT JOIN specials s ON p.products_id = s.products_id
where p.products_status = '1'
and pd.language_id = '2'
and IF(s.specials_new_products_price>0, s.status = '1', '1')
".$group_check."
order by
p.products_date_added DESC
" ;
$listing_query = xtDBquery($query);
header("Content-Type: text/xml");
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n\n";
echo "<rss version=\"2.0\" xmlns:g=\"http://base.google.com/ns/1.0\" xmlns:c=\"http://base.google.com/cns/1.0\">\n\n";
echo "<channel>\n";
echo "<title>$Title</title>";
echo "<link>$SiteLink</link>";
while ($listing = xtc_db_fetch_array($listing_query, true)) {
$link = xtc_href_link(FILENAME_PRODUCT_INFO, xtc_product_link($listing['products_id'],$listing['products_name']),'NONSSL', false);
$linkimage = HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_THUMBNAIL_IMAGES.$listing['products_image'];
$price = $xtPrice->xtcGetPrice($listing['products_id'], $format=false, 1, $listing['products_tax_class_id'],'');
$products_name = $listing['products_name'];
$products_name = str_replace ("&", "&", $products_name);
$products_name = str_replace ("\n", " ", $products_name);
echo "\n\n<item>";
echo "<title>" . $products_name . "</title>";
echo "<link>" . $link . "</link>";
echo "<g:beschreibung><![CDATA['.$listing['products_short_description']."]]></g:beschreibung>";
echo "<g:id>" . $listing['products_id'] . "</g:id>";
echo "<g:bild_url>".$linkimage."</g:bild_url>";
echo "<g:preis>".$price['formated']."</g:preis>";
echo "<g:zustand>".$listing['products_zustand']. "</g:zustand>";
echo "</item>";
}
echo "</channel>";
echo "</rss>";
?>
Alles anzeigen
Was stimmt da nicht?
gruß
shop-muskelaufbau.de