avi1333 Posted December 20, 2009 Share Posted December 20, 2009 hello,i need build a mirror site to my prestashopi need that will be in XMLsomeone in the forum five me this code: <?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 ''; ?> but i need division according categoryto example:computer category = computer . XMLmovies category = movies.xmlso i everybody can help me its will greatthank you alot Link to comment Share on other sites More sharing options...
JAKCRABBIT Posted December 20, 2009 Share Posted December 20, 2009 <?php $shopUrl = 'http://www.presta.bazarhudebnin.cz'; // url your shop 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); // 3 - ID your language $products=Product::getProductsProperties(3, $p); // 3 - ID your language header("Content-Type: text/xml"); echo '<?xml version="1.0" encoding="utf-8"?> '; foreach ($products as $row) { $img=Product::getCover($row['id_product']); echo ' '.str_replace("&", "&", $row['name']).' '.str_replace("&", "&",strip_tags($row['description_short'])).' '.$row['link'].' '.$shopUrl.'/img/p/'.$row['id_product'].'-'.$img['id_image'].'.jpg '.($row['price']*1).' 0 '; } echo ''; ?> Link to comment Share on other sites More sharing options...
avi1333 Posted December 20, 2009 Author Share Posted December 20, 2009 thank you alot ,but its similar to what i postits not what i needi need similar thing but acording by categoryi mean for each category have her xml filethank you Link to comment Share on other sites More sharing options...
JAKCRABBIT Posted December 20, 2009 Share Posted December 20, 2009 Oh, sry, i do read a end of your post.... Link to comment Share on other sites More sharing options...
GNeRaL Posted December 20, 2009 Share Posted December 20, 2009 How to learn all values?.......................like... how to learn that values AND how to seperate with Category? Link to comment Share on other sites More sharing options...
avi1333 Posted December 20, 2009 Author Share Posted December 20, 2009 yes you know how i do this?what the code? Link to comment Share on other sites More sharing options...
GNeRaL Posted December 21, 2009 Share Posted December 21, 2009 I don't know too and I want to learn. But no more helper is here. Link to comment Share on other sites More sharing options...
avi1333 Posted December 24, 2009 Author Share Posted December 24, 2009 i try find a solution's and i update here 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