0 użytkowników i 2 Gości przegląda ten wątek.
<?php$shopUrl = 'adres www sklepu';$langHr = 4;include(dirname(__FILE__).'/config/config.inc.php');require_once(dirname(__FILE__).'/init.php');error_reporting(0);$p=Product::getProducts(4, 0, 0, 'id_product', 'desc', false); // number 4 is id of language in database$products=Product::getProductsProperties(4, $p); // number 4 is id of language in databaseheader("Content-Type: text/xml");echo '<?xml version="1.0" encoding="utf-8"?><products xmlns="http://www.sklepy24.pl"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://www.sklepy24.pl http://www.sklepy24.pl/formats/products.xsd"date="2011-02-11">';foreach ($products as $row) {if ($row['active']){$img=Product::getCover($row['id_product']);echo ' <product id="'.str_replace("&", "&", $row['id_product']).'"> <name>'.str_replace("&", "&", $row['name']).'</name> <url>'.$shopUrl.''.$row['link'].'</url> <brand>'.str_replace("&", "&", $row['manufacturer_name']).'</brand> <price>'.($row['price']).'</price> <categories> <category>'.str_replace("&", "&", $row['category']).'</category> </categories> <photo>'.$shopUrl.'/img/p/'.$row['id_product'].'-'.$img['id_image'].'.jpg</photo> <description>'.str_replace("&", "and", strip_tags($row['description_short'])).'</description> </product>';}}echo '</products>';?>
echo <?xml version="1.0" encoding="utf-8"?>
echo '<?xml version="1.0" encoding="utf-8"?>