stullko Posted November 29, 2011 Share Posted November 29, 2011 Hello, i have this export code, but i need export attributes too. I was try many solution, but its still not working. I have 3 groups and many attributes, for example attributes_4, attributes_7... Can anybody please help me. <?php $shopUrl = 'http://www.mysite.com'; include(dirname(__FILE__).'/config/config.inc.php'); include(dirname(__FILE__).'/init.php'); error_reporting(0); $p=Product::getProducts(4, 0, 0, 'id_product', 'desc', false,true); $products=Product::getProductsProperties(3, $p); header("Content-Type: text/xml"); echo '<?xml version="1.0" encoding="utf-8"?> <SHOP>'; foreach ($products as $row) { $kategorie=array(); $category = new Category(intval($row['id_category_default']), intval(4)); while ($category->id <> 1) { $kategorie[]=$category->hideCategoryPosition($category->name); $category = new Category(intval($category->id_parent), intval(4)); } $img=Product::getCover($row['id_product']); echo ' <SHOPITEM> <PRODUCT>'.str_replace("&", "and", strip_tags($row['name'])).'</PRODUCT> <DESCRIPTION>'.str_replace("&", "&",strip_tags(html_entity_decode($row['description_short'], ENT_COMPAT, 'utf-8'))).'</DESCRIPTION> <IMAGE>http://www.mysite.com/img/p/'.$row['id_product'].'-'.$img['id_image'].'.jpg</IMAGE> <PRICE>'.($row['price']*1).'</PRICE> <MANUFACTURER>'.htmlspecialchars($row['manufacturer_name']).'</MANUFACTURER> <CATEGORY>'.implode(' , ',array_reverse($kategorie)).'</CATEGORY> </SHOPITEM>'; } echo '</SHOP>'; ?> Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now