Jump to content

XML feed dor prestashop 1.4


bhole1

Recommended Posts

Hello.
I have a problem with the XML feed reads all he has but one problem is that at the end Print the error

This page contains the following errors:

error on line 548 at column 31: EntityRef: expecting ';'
Below is a rendering of the page up to the first error.



You really do not know deal with it. Can anyone tell me what is wrong? I use presto 1.4 Source code my feed. it should be universal for sk / cz market

<?php
$shopUrl = 'http://www.eurobik.sk';  // název dom ny
include(dirname(__FILE__).'/config/config.inc.php'); // správná cesta k souboru
include(dirname(__FILE__).'/init.php'); // správná cesta k souboru
error_reporting(0);
$p=Product::getProducts(8, 0, 0, 'id_product', 'desc', false); //  eština v DB pod   slem 3
$products=Product::getProductsProperties(8, $p); //  eština v DB pod   slem 3

header("Content-Type: text/xml");
echo '<?xml version="1.0" encoding="utf-8"?>

eurobik.sk
www.eurobik.sk/';

foreach ($products as $row) {
if ($row['active']){
$kategorie=array();
$category = new Category(intval($row['id_category_default']), intval(8));
while ($category->id <> 1) {
   $kategorie[]=$category->hideCategoryPosition($category->name);
   $category = new Category(intval($category->id_parent), intval(8));
}

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

'.str_replace("&", "&", $row['supplier_name']).'
'.str_replace("&", "&", $row['manufacturer_name']).'
'.str_replace("&", "and", strip_tags($row['name'])).'
'.str_replace("&", "and", strip_tags($row['description_short'])).'
'.str_replace("&", "and", strip_tags($row['description'])).'
'.implode('>',array_reverse($kategorie)).'
'.$row['link'].'
http://www.eurobik.sk/img/p/'.$row['id_product'].'-'.$img['id_image'].'-home.jpg
'.$row['tax_rate'].'
'.($row['price']*1).'
'.($row['reduction_price']*1).'
'.($row['quantity']*1).'
'.$row['reduction_percent'].'
'.$row['reduction_from'].'
'.$row['reduction_to'].'
'.$row['on_sale'].'
'.$row['available_now'].'
'.$row['available_later'].'
'.($row[‘quantity’] > 0 ? '1' : '2').'
'.$row['supplier_reference'].'
'.$row['reference'].'
'. round($row['ean13']) .'
';
[spam-filter]
echo '';

?>



Alternatively http://eurobik.sk/xml.php
Thank you for each line and your time.

Link to comment
Share on other sites

  • 3 months later...

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...