$xml_content .= generateXMLarticle($article_number, $sp_detail, $p, $article_uselength); } //OTHER ARTICLES (ADDITIONAL LENGTH, ETC) if (count($articles) > 0) { foreach ($articles as $article) { if ($article['active_status'] != '0') { $a = $p; $a['articles_id'] = $article['products_articles_id']; $a['length'] = $article['length']; $a['text'] = $article['text']; $a['text_code'] = $article['text_code']; //Articles Prices are disabled //$a['price'] = $article['price']; //$a['price_old'] = $article['price_old']; $a['products_ean'] = $article['products_ean']; $xml_content .= generateXMLarticle($article_number, $sp_detail, $a, $article_uselength); } } } $xml_content .= writeXMLclose('PRODUCTDATA', 0); $xml_content .= writeLine(); //DIRECTLY WRITE TO FILE PARTIALLY AND CLEAR THE XML CONTENT $success = fwrite($file, $xml_content) !== false; $xml_content = ''; if (!isset($pcounter)) { $pcounter = 0; } $pcounter++; if ($pcounter == 100) { echo '. '; $pcounter = 0;
$xml_content .= generateXMLarticle($article_number, $p); } //OTHER ARTICLES (ADDITIONAL LENGTH, ETC) if (count($articles) > 0) { foreach ($articles as $article) { if ($article['products_ean'] != '' && $article['active_status'] != '0') { $a = $p; $a['articles_id'] = $article['products_articles_id']; $a['length'] = $article['length']; $a['text'] = $article['text']; $a['text_code'] = $article['text_code']; //Articles Prices are disabled //$a['price'] = $article['price']; //$a['price_old'] = $article['price_old']; $a['products_ean'] = $article['products_ean']; $xml_content .= generateXMLarticle($article_number, $a); } } } //DIRECTLY WRITE TO FILE PARTIALLY AND CLEAR THE XML CONTENT $success = fwrite($file, $xml_content) !== false; $xml_content = ''; //echo '. '; //templine } //END PRODUCT LOOPING //echo '<br /><br />'; //templine if ($error) { exit; } //XML CLOSER $xml_content .= writeXMLclose('NVAG_CATALOG', 0);