Jump to content

XML pro hyperzbozi.cz a monitor.cz


Kaspi88

Recommended Posts

  • 2 weeks later...
  • 5 months later...

Co kdyby jis zkusil si ho poskládat sám?

<?php
$shopUrl = 'http://www...........cz';  
include(dirname(__FILE__).'/config/config.inc.php');
include(dirname(__FILE__).'/init.php'); 
error_reporting(0);
$p=Product::getProducts(3, 0, 0, 'id_product', 'desc', false);
$products=Product::getProductsProperties(3, $p);

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

Název vašeho obchodu
www........cz/';

foreach ($products as $row) {

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

$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.......com/img/p/'.$row['id_product'].'-'.$img['id_image'].'-home.jpg
'.$row['tax_rate'].'
'.($row['price']*1).'
'.($row['reduction_price']*1).'
'.($row['wholesale_price']*1).'
'.($row['quantity']*1).'
'.$row['reduction_percent'].'
'.$row['reduction_from'].'
'.$row['reduction_to'].'
'.$row['on_sale'].'
'.$row['available_now'].'
'.$row['available_later'].'
'.$row['supplier_reference'].'
'.$row['reference'].'
'. round($row['ean13']) .'
';
}
echo '';
?>

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