Jump to content

Xml not working


Recommended Posts

Hi,

 

My xml the data does not take the right.

 

post-395758-0-66468300-1357140310_thumb.png

 

it must be 100 ml.

 

<?php
$id_lang = 1;
$limit   = 2000;
@ini_set('display_errors', 'on');
include(dirname(__FILE__) . '/config/config.inc.php');
include(dirname(__FILE__) . '/init.php');
@header ("content-type: text/xml");
$categories = Category::getSimpleCategories($id_lang);
?>
<xml version="1.0" encoding="utf-8">
<urunler>
<?  $pro_aray = array();
foreach($categories as $category):?>

<?
$products = Product::getProducts($id_lang, 0, $limit, 'id_product', 'ASC', $category['id_category'], true);
foreach($products as $product):
 if(in_array($product['id_product'], $pro_aray))
  continue;
 $pro_aray []= $product['id_product'];
 $p = New Product($product['id_product']);
 $image = $p->getCover($product['id_product']);
 //print_r($p);
// $product = New Product($product['id_product'], null, $id_lang);
 //print_r($product);
?><urun>
 <marka><?=$product['manufacturer_name']?></marka>
 <isim><?=htmlspecialchars($product['name'])?></isim>
 <fiyat><?=Product::getPriceStatic($product['id_product'])?></fiyat>
 <urun_url><?=$link->getProductLink($p)?></urun_url>
 <kategori><?=$product['id_category_default']?></kategori>
 <resim_url><?=$link->getImageLink($product['link_rewrite'], $product['id_product'].'-'.$image['id_image'], 'large')?></resim_url>
 <urun_kodu><?=$product['reference']?></urun_kodu>
 <urun_id><?=$product['id_product']?></urun_id>
</urun>
<?endforeach;?>
<?endforeach;?>
</urunler>
</xml>

post-395758-0-84241900-1357140242_thumb.png

Link to comment
Share on other sites

×
×
  • Create New...