Désolée de ne pas etre revenue rapidement.
Alors je suis sur une creload 6.2 PRO.
Ma version de l'export universel c'est :
$Id: export.php, version 1.3 Mardi 18 mars 2008 Vaisonet Exp $
Et pour mon code export.php :
<?php
/*
$Id: export.php, version 1.3 Mardi 18 mars 2008 Vaisonet Exp $
Contribution Export universel
http://www.vaisonet.com
Copyright © 2007 Vaisonet
Released under the GNU General Public License
*/
//////////////////////////
/// Configuration ///
/// see lisezmoi.html ///
//////////////////////////
$verif = true;
$pass = '681129';
define ('DISPLAY_PRICE_WITH_TAX', true);
$ean = false;
$ecotax = false;
// fonction de nettoyage des données si présence d'un éditeur html
function netoyage_html($CatList, $length)
{
$CatList = html_entity_decode ($CatList);
$CatList = strip_tags ($CatList);
$CatList = trim ($CatList);
$CatList = strtolower ($CatList);
$CatList = str_replace(chr(9),"",$CatList);
$CatList = str_replace(chr(10),"",$CatList);
$CatList = str_replace(chr(13),"",$CatList);
$CatList = preg_replace("[<(.*?)>]","",$CatList);
if (strlen($CatList) > $length) {
$CatList = substr($CatList, 0, $length-3) . "...";
}
return $CatList;
}
// temps d'exécution infini
// ne fonctionne pas sur tous les serveurs, dans ce cas il y aura des timeouts
// et les fichiers seront incomplets. Mieux vaut alors opter pour un hébergement plus performant.
set_time_limit(0);
require('includes/application_top.php');
$output = '';
// sécurisation des variables et vérification
//La ligne ci-après permet de passer des frais de port fixe dans l'url
$port = (isset($HTTP_GET_VARS['port']) && tep_not_null($HTTP_GET_VARS['port'])) ? tep_db_prepare_input($HTTP_GET_VARS['port']) : "-1";
$language_code = (isset($HTTP_GET_VARS['language']) && tep_not_null($HTTP_GET_VARS['language'])) ? tep_db_prepare_input($HTTP_GET_VARS['language']) : DEFAULT_LANGUAGE;
$p = tep_db_prepare_input($HTTP_GET_VARS['p']);
$format = basename(tep_db_prepare_input($HTTP_GET_VARS['format']));
$cache = tep_db_prepare_input($HTTP_GET_VARS['cache']);
$fichier = tep_db_prepare_input($HTTP_GET_VARS['fichier']);
$libre = tep_db_prepare_input($HTTP_GET_VARS['libre']);
if ($HTTP_GET_VARS['rep'] == "1") $rep = 'export/secure/';
else $rep = 'export/';
//On vérifie le code avant de lancer les requêtes
if( ($verif == true and $p==$pass) OR $verif == false )
{
$included_categories_query = tep_db_query("SELECT c.categories_id, c.parent_id, cd.categories_name FROM " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd WHERE c.categories_id = cd.categories_id AND cd.language_id = FLOOR($languages_id)");
$inc_cat = array();
// Identification du nom de la catégorie, et l'id de la catégorie parent
while ($included_categories = tep_db_fetch_array($included_categories_query)) {
$inc_cat[] = array (
'id' => $included_categories['categories_id'],
'parent' => $included_categories['parent_id'],
'name' => $included_categories['categories_name']);
}
$cat_info = array();
for ($i=0; $i<sizeof($inc_cat); $i++)
$cat_info[$inc_cat[$i]['id']] = array (
'parent'=> $inc_cat[$i]['parent'],
'name' => $inc_cat[$i]['name'],
'path' => $inc_cat[$i]['id'],
'link' => '' );
for ($i=0; $i<sizeof($inc_cat); $i++) {
$cat_id = $inc_cat[$i]['id'];
while ($cat_info[$cat_id]['parent'] != 0){
$cat_info[$inc_cat[$i]['id']]['path'] = $cat_info[$cat_id]['parent'] . '_' . $cat_info[$inc_cat[$i]['id']]['path'];
$cat_id = $cat_info[$cat_id]['parent'];
}
$link_array = split('_', $cat_info[$inc_cat[$i]['id']] ['path']);
for ($j=0; $j<sizeof($link_array); $j++) {
$cat_info[$inc_cat[$i]['id']]['link'] .= ' <a href="' . tep_href_link(FILENAME_DEFAULT, 'cPath=' . $cat_info[$link_array[$j]]['path']) . '"><nobr>' . $cat_info[$link_array[$j]]['name'] . '</nobr></a> » ';
}
}
// Requête identifiant les produits disponibles dans le catalogue
$products_query = tep_db_query("SELECT p.*,
pd.products_name, pd.products_description,
pc.categories_id,
pr.date_added as review_date, pr.customers_name, pr.reviews_rating,
pt.reviews_text, pt.languages_id as lngr
FROM (" . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " pc)
LEFT JOIN reviews as pr ON (p.products_id = pr.products_id)
LEFT JOIN reviews_description as pt ON (pr.reviews_id = pt.reviews_id)
WHERE p.products_id = pd.products_id
AND p.products_id = pc.products_id
AND p.products_status = 1
AND pd.language_id = FLOOR($languages_id)
ORDER BY pc.categories_id, pd.products_name");
$product_num = 0;
while($products = tep_db_fetch_array($products_query)) {
if (intval($products['manufacturers_id']) > 0) {
$manufacturers_query = tep_db_query("SELECT manufacturers_name FROM " . TABLE_MANUFACTURERS . " WHERE manufacturers_id = " . $products['manufacturers_id']);
$manufacturers_result = tep_db_fetch_array($manufacturers_query);
$products['manufacturers_name'] = $manufacturers_result['manufacturers_name'];
}
$special_query = tep_db_query("SELECT specials_new_products_price , expires_date , specials_date_added FROM " . TABLE_SPECIALS . " WHERE products_id = " . $products['products_id'] . " AND status = '1' limit 1");
$special_result = tep_db_fetch_array($special_query);
if ($special_result['specials_new_products_price'] > 0) $products['products_price'] = $special_result['specials_new_products_price'];
$product_num++;
//calcul des prix
// la varaible $reduc permet de tester s'il y a une promo
$price = tep_add_tax($products['products_price'], tep_get_tax_rate($products['products_tax_class_id']));
if($special_result['specials_new_products_price'] == '' ) {
$discount_price = '' ;
$regular_price = $price;
$reduc = false;
} else {
$discount_price = $special_result['specials_new_products_price'];
$regular_price = $price;
$reduc = true;
}
// Test barcod mod
if (!$ean) $products['products_barcode'] == "";
// Test ecotax
if ($ecotax) $ecotax_montant = tep_get_ecotax_price_value($products['ecotax_rates_id']);
else $ecotax_montant = 0;
// On appelle le "plugin" définissant le format du fichier
include(DIR_WS_MODULES . 'ExU/' . $format);
}
$content = $head . $output . $foot;
//Soit on met en cache, soit on affiche le résulat
if ($cache != "true")
{
Header( $header );
if ($header2) Header( $header2 );
echo $content;
}
else
{
$fp= fopen(DIR_FS_CATALOG . $rep . $fichier,"w");
fputs($fp,"$content");
fclose($fp);
}
}
require(DIR_WS_INCLUDES . 'application_bottom.php');
?>
En fait j'ai pas mal de petit soucis sur ma boutique, je les règles au fur et a mesure, le problème c'est que ma creload était livrée avec un theme que j'ai acheté, donc je n'ai pas moyen de télécharger les patchs gratuitement.
Merci vini