Jump to content

XML feed do vyhladavačov


modigi

Recommended Posts

Zdravim,

 

vedel by mi prosim Vas niekto poradit preco v novom PS 1.5.2 nefunguje moj xml feed php ? :

 

<?php

$shopUrl = 'http://www.your shop'; // adresa shopu včetně http://

include(dirname(__FILE__).'/config/config.inc.php'); // cesta ke config souboru

include(dirname(__FILE__).'/init.php');

error_reporting(0);

$p=Product::getProducts(5, 0, 0, 'id_product', 'desc', false); // sk je v databázi zapsaná pod číslem 5

$products=Product::getProductsProperties(5, $p); // sk je v databázi zapsaná pod číslem 5

 

header("Content-Type: text/xml");

echo '<?xml version="1.0" encoding="utf-8"?>

<SHOP>';

foreach ($products as $row) {

$img=Product::getCover($row['id_product']);

echo '

<SHOPITEM>

<SHOPID>'.$row['id_product'].'</SHOPID>

<ARTIKEL>'.str_replace("&", "&", $row['name']).'</ARTIKEL>

<ARTIKELNR.>'.$row['reference'].'</ARTIKELNR.>

<HERSTELLER>'.str_replace("&", "&", $row['manufacturer_name']).'</HERSTELLER>

<BESCHREIBUNG>'.str_replace("&", "&",strip_tags($row['description'])).'</BESCHREIBUNG>

<ARTIKELURL>'.$row['link'].'</ARTIKELURL>

<IMGURL>'.$shopUrl.'/img/p/'.$row['id_product'].'-'.$img['id_image'].'.jpg</IMGURL>

<PRICE_VAT>'.($row['price']*1).'</PRICE_VAT>

<LAGERSTAND>'.($row['quantity']*1).'</LAGERSTAND>

<EAN>'. round($row['ean13']) .'</EAN>

 

</SHOPITEM>';

}

echo '</SHOP>';

?>

 

 

V starom shope PS 1:3.7 funguje bez problemov.

 

Pripadne vedel by niekto poradit novy php subor na vygenerovanie xml feedu v PS 1.5.2 ?

 

Dakujem za Vasu pomoc.

Link to comment
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
×
×
  • Create New...