par
aazzeerrttyy » 05 mai 2012, 16:02
Bonjour à tous.
Je viens vers vous afin de résoudre un problème sur lequel je bloque depuis quelques jours. D'habitude, j'arrive à me dépatouiller en cherchant sur le forum mais la je bloque. Je vous préviens tout de suite, je suis assez novice en php.
J'utilise OScommerce en logiciel de CMS et je suis en train de mettre en place une liste de prix en pdf qui pourra être imprimé ou télécharger. J'arrive à créer le truc mais il fait 13 pages et j'aimerais l'optimiser au mieux. J'ai déjà réduit de 17 à 13 pages en jouant sur les marges, les espaces... Je pense que la solution est de passer par plusieurs colonnes.
Actuellement, il m'affiche la liste des prix (nom, modéles et prix issus d'une base de données) dans un pdf via fpdf sur toutes la largeur de la pages. En bidouillant j'ai réduit de moitié la taille ce qui me libère la partie droite mais je n'arrive pas à demander à FPDF de l'écrire la. Il me crée systématiquement une nouvelle page.
Voici mon code qui me permet d'afficher, si quelque peut me donner un coup de main:
Code : Tout sélectionner
function DrawCells($data_array)
{
$totallines=0;
for($i=2;$i<(sizeof($data_array)-1);$i++)
{
$totallines+=$this->NbLines(($this->ifw -$data_array[0]),$data_array[$i]);
}
//5 = Höhe der Zellen - eigentlich Faktor für Füllung der Seite
$h=1*($totallines+1)."<br>";
//wenn die Beschreibung des Produktes nicht die ganze Seite nimmt
if($h< $this->ifh)
{
$this->CheckPageBreak($h);
}
{
$data_array[0]=$data_array[1]=0;
$y1=$this->GetY();
$this->SetFont( 'Arial','',8);
}
if(SHOW_MODEL)
{
if(strlen($data_array[3]))
{
$x=$this->GetX();
$y=$this->GetY();
$this->Cell(13,8," ".$data_array[3]."",0,'L');
}
}
if(SHOW_NAME)
{
if(strlen($data_array[2]))
{
// Cell(marge gauche, hauteur, text, bordure, )
// $y=$this->SetY(0);
// $name_color_table=explode(",",NAME_COLOR);
// $this->SetFillColor($name_color_table[0],$name_color_table[1],$name_color_table[2]);
$this->Cell(70,8,$data_array[2],0,'L');
}
}
if(SHOW_TAX_CLASS_ID)
{
if(strlen($data_array[7]))
{
$this->Cell($this->text_fw,5,$data_array[7],1,'L');
}
}
if(VAT == '1')
{
$vatprice_query=tep_db_query("select p.products_id, p.products_tax_class_id, tr.tax_rate from " . TABLE_PRODUCTS . " p, " . TABLE_TAX_RATES . " tr where p.products_id = '" . $data_array[10] . "' and p.products_tax_class_id = tr.tax_class_id");
while($vatprice1 = tep_db_fetch_array($vatprice_query)) {
$steuer = $vatprice1['tax_rate'];
}
$vatprice=sprintf("%01.".DIGITS_AFTER_DOT."f",(($steuer/100)*$data_array[9])+$data_array[9]);
$vatspecialsprice=sprintf("%01.".DIGITS_AFTER_DOT."f",(($steuer/100)*$data_array[8])+$data_array[8]);
}
else
{
$vatprice=sprintf("%01.".DIGITS_AFTER_DOT."f",$data_array[9]);
$vatspecialsprice=sprintf("%01.".DIGITS_AFTER_DOT."f",$data_array[8]);
}
if(SHOW_PRICES)
{
// NH, wenn es keinen Rand gibt, Zusatz eines kleinen separateur
/* if (!PRODUCTS_BORDER) {
$this->Cell($data_array[0]+6,5,"",0,0);
// $x=$this->GetX();
// $y=$this->GetY();
$this->Cell($this->text_fw,1,"",0,'C');
//$this->LineString($x+3,$y," ",2);
$this->Line($x+4,$y,$x+15,$y);
} */
if(strlen($data_array[8])) //If special price
{
//$y=-5;
//$x=$this->GetX();
// $y=$this->SetY(0);
$specials_price_color_table=explode(",",SPECIALS_PRICE_COLOR);
$this->SetTextColor($specials_price_color_table[0],$specials_price_color_table[1],$specials_price_color_table[2]);
$this->SetFont('Arial','B','');
if(CURRENCY_RIGHT_OR_LEFT == 'R') {
$this->Cell(25,8,$vatprice.CURRENCY."\t\t\t".$vatspecialsprice.CURRENCY,PRODUCTS_BORDER,'L'); // die Hinzufügung eines param,1 gefüllt die Grundfarbe );
} else if (CURRENCY_RIGHT_OR_LEFT == 'L') {
$this->Cell($this->text_fw,8,CURRENCY.$vatprice."\t\t\t".CURRENCY.$vatspecialsprice,PRODUCTS_BORDER,'L'); // die Hinzufügung eines param,1 gefüllt die Grundfarbe );
} else {
echo "<b>Choose L or R for CURRENCY_RIGHT_OR_LEFT</b>";
exit();
}
//$x=$this->SetX(176);
$this->LineString('176',$y,$vatprice.CURRENCY,8);
}
else if(strlen($data_array[9]))
{
// $y=-5;
if(CURRENCY_RIGHT_OR_LEFT == 'R') {
$this->Cell(25,8,$vatprice.CURRENCY,PRODUCTS_BORDER,'L');
}else if(CURRENCY_RIGHT_OR_LEFT == 'L') {
$this->Cell($this->text_fw,8,CURRENCY.$vatprice,PRODUCTS_BORDER,'L');
} else {
echo "<b>Choose L or R for CURRENCY_RIGHT_OR_LEFT</b>";
exit();
}
}
$this->SetTextColor(0,0,0);
}
$y2=$this->GetY();
// wenn die Beschreibung des Produktes nicht die ganze Seite nimmt
if($h< $this->ifh)
{
$this->CalculatedSpace($y1,$y2,$data_array[1]);
}
else
{
$this->Ln(5);
}
}
function CategoriesTree($languages_id,$languages_code)
{
//selectionne all categories
$query = "SELECT c.categories_id, cd.categories_name, c.parent_id
FROM " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd
WHERE c.categories_id = cd.categories_id and cd.language_id='" . $languages_id ."'
ORDER by sort_order, cd.categories_name";
$categories_query = tep_db_query($query);
while ($categories = tep_db_fetch_array($categories_query)) {
//Count of chopping
$foo[$categories['categories_id']] = array(
'name' => $categories['categories_name'],
'parent' => $categories['parent_id']);
}
$this->Order(0, 0, $foo, '');
$this->AddPage();
$this->TitreChapitre("");
if (SHOW_INTRODUCTION) {
$this->Ln(18);
$file= DIR_FS_CATALOG_LANGUAGES . tep_get_languages_directory($languages_code) . '/pdf_define_intro.php';
// echo "<br>HHHH " . $file;
if (file_exists($file)) {
$file_array = @file($file);
$file_contents = @implode('', $file_array);
$this->MultiCell(0,6,strip_tags($file_contents),$this->ifw,1,'J');
}
}
$this->SetFont('Arial','',DIRECTORIES_TREE_FONT_SIZE);
if (SHOW_TREE) {
$this->Ln(15);
$this->MultiCell(0,6,$this->categories_string_spe,0,1,'L');
}
}
// Revision the function for MYSQL 5
function CategoriesListing($languages_id, $languages_code)
{
$this->products_index_array=array();
$this->products_index_list='';
$this->index_lenght=0;
//Recuperation de toutes les categories dans l'ordre
$categoriesidarray=explode(" ",$this->categories_id);
$categoriesnamearray=explode("\n",$this->categories_string);
$categorieslevelsarray=explode(" ",$this->levels);
//Convertion pixels -> mm
$imagewidth=SMALL_IMAGE_WIDTH*PDF_TO_MM_FACTOR;
$imageheight=SMALL_IMAGE_HEIGHT*PDF_TO_MM_FACTOR;
for($i=0; $i<sizeof($categoriesidarray)-1; $i++) {
$category_count_products = tep_products_in_category_count($categoriesidarray[$i],'false');
if (!((!SHOW_EMPTY_CATEGORIES) and ($category_count_products < 1))) {
$taille=0;
$current_category_id=$categoriesidarray[$i];
$current_category_name=$categoriesnamearray[$i];
$current_category_level=$categorieslevelsarray[$i];
$requete_prod="select p.products_id, pd.products_name, pd.products_description, p.products_image, p.products_model, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, p.products_date_added, m.manufacturers_name from ((" . TABLE_PRODUCTS . " p) left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id='".$current_category_id."' order by pd.products_name, p.products_date_added DESC";
$SHOW_catalog_query = tep_db_query($requete_prod);
while ($print_catalog = tep_db_fetch_array($SHOW_catalog_query)) {
$print_catalog_array[$taille++] = array(
'id' => $print_catalog['products_id'],
'name' => $print_catalog['products_name'], 'description' => $print_catalog['products_description'],
'model' => $print_catalog['products_model'],
'image' => $print_catalog['products_image'],
'price' => $print_catalog['products_price'], 'specials_price' => $print_catalog['specials_new_products_price'],
'tax_class_id' => $print_catalog['products_tax_class_id'],
'date_added' => tep_date_long($print_catalog['products_date_added']),
'manufacturer' => $print_catalog['manufacturers_name']);
}
//Forschung der Name der Vaterkategorie
// Revision $parent_category_name for PHP 5
$this->parent_category_name='';
$this->ParentsName($current_category_level,$i,$categorieslevelsarray, $categoriesnamearray);
if (($current_category_level == 1) and (CATEGORIES_PAGE_SEPARATOR)) {
$this->AddPage();
$this->Ln(120);
$this->SetFont('Arial','',12);
$titles_color_table=explode(",",CENTER_TITLES_CELL_COLOR);
$this->SetFillColor($titles_color_table[0], $titles_color_table[1], $titles_color_table[2]);
$this->Cell(45,5,"",0,0);
$this->MultiCell(100,10,$current_category_name,1,'C',1);
}
if ($taille > 0) { // nonempty category
// $this->AddPage(); // beginnt neue Kategorie mit neuer Seite
// Revision $parent_category_name for PHP 5
if (strlen($this->parent_category_name) > 0 ) {
$this->TitreChapitre($this->parent_category_name. CATEGORIES_SEPARATOR .$current_category_name);
} else {
$this->TitreChapitre($current_category_name);
}
$this->Ln(3); // NH
$this->SetFont('Arial','',11);
for($j=0; $j<$taille; $j++ ) {
// NH if not image definie, image by default
if (strlen($print_catalog_array[$j]['image']) > 0) {
$imagepath=DIR_FS_CATALOG.DIR_WS_IMAGES.$print_catalog_array[$j]['image'];
} else {
$imagepath=DIR_FS_CATALOG.DIR_WS_IMAGES.'/'.DEFAULT_IMAGE;
}
$id=$print_catalog_array[$j]['id'];
$name=rtrim(strip_tags($print_catalog_array[$j]['name']));
$model=rtrim(strip_tags($print_catalog_array[$j]['model']));
$description=rtrim(strip_tags($print_catalog_array[$j]['description']));
$manufacturer=rtrim(strip_tags($print_catalog_array[$j]['manufacturer']));
$price=rtrim(strip_tags($print_catalog_array[$j]['price']));
$specials_price=rtrim(strip_tags($print_catalog_array[$j]['specials_price']));
$tax_class_id=rtrim(strip_tags($print_catalog_array[$j]['tax_class_id']));
$date_added=rtrim(strip_tags($print_catalog_array[$j]['date_added']));
$data_array=array($imagewidth,$imageheight,$name,$model,$date_added,$manufacturer,$description,$tax_class_id,$specials_price,$price,$id,$languages_code,$imagepath);
$this->Ln(PRODUCTS_SEPARATOR); // NH blank space before the products description cells
$this->DrawCells($data_array);
if (SHOW_INDEX) {
switch (INDEX_EXTRA_FIELD) {
case 1 : $this->PrepareIndex($name,$manufacturer,$current_category_name);
break;
case 2 : $this->PrepareIndex($name,$model,$current_category_name);
break;
case 3 : $this->PrepareIndex($name,$date_added,$current_category_name);
break;
default : $this->PrepareIndex($name,"",$current_category_name);
}
}
}
}
}
}
}
Merci !
Bonjour à tous.
Je viens vers vous afin de résoudre un problème sur lequel je bloque depuis quelques jours. D'habitude, j'arrive à me dépatouiller en cherchant sur le forum mais la je bloque. Je vous préviens tout de suite, je suis assez novice en php.
J'utilise OScommerce en logiciel de CMS et je suis en train de mettre en place une liste de prix en pdf qui pourra être imprimé ou télécharger. J'arrive à créer le truc mais il fait 13 pages et j'aimerais l'optimiser au mieux. J'ai déjà réduit de 17 à 13 pages en jouant sur les marges, les espaces... Je pense que la solution est de passer par plusieurs colonnes.
Actuellement, il m'affiche la liste des prix (nom, modéles et prix issus d'une base de données) dans un pdf via fpdf sur toutes la largeur de la pages. En bidouillant j'ai réduit de moitié la taille ce qui me libère la partie droite mais je n'arrive pas à demander à FPDF de l'écrire la. Il me crée systématiquement une nouvelle page.
Voici mon code qui me permet d'afficher, si quelque peut me donner un coup de main:
[code] function DrawCells($data_array)
{
$totallines=0;
for($i=2;$i<(sizeof($data_array)-1);$i++)
{
$totallines+=$this->NbLines(($this->ifw -$data_array[0]),$data_array[$i]);
}
//5 = Höhe der Zellen - eigentlich Faktor für Füllung der Seite
$h=1*($totallines+1)."<br>";
//wenn die Beschreibung des Produktes nicht die ganze Seite nimmt
if($h< $this->ifh)
{
$this->CheckPageBreak($h);
}
{
$data_array[0]=$data_array[1]=0;
$y1=$this->GetY();
$this->SetFont( 'Arial','',8);
}
if(SHOW_MODEL)
{
if(strlen($data_array[3]))
{
$x=$this->GetX();
$y=$this->GetY();
$this->Cell(13,8," ".$data_array[3]."",0,'L');
}
}
if(SHOW_NAME)
{
if(strlen($data_array[2]))
{
// Cell(marge gauche, hauteur, text, bordure, )
// $y=$this->SetY(0);
// $name_color_table=explode(",",NAME_COLOR);
// $this->SetFillColor($name_color_table[0],$name_color_table[1],$name_color_table[2]);
$this->Cell(70,8,$data_array[2],0,'L');
}
}
if(SHOW_TAX_CLASS_ID)
{
if(strlen($data_array[7]))
{
$this->Cell($this->text_fw,5,$data_array[7],1,'L');
}
}
if(VAT == '1')
{
$vatprice_query=tep_db_query("select p.products_id, p.products_tax_class_id, tr.tax_rate from " . TABLE_PRODUCTS . " p, " . TABLE_TAX_RATES . " tr where p.products_id = '" . $data_array[10] . "' and p.products_tax_class_id = tr.tax_class_id");
while($vatprice1 = tep_db_fetch_array($vatprice_query)) {
$steuer = $vatprice1['tax_rate'];
}
$vatprice=sprintf("%01.".DIGITS_AFTER_DOT."f",(($steuer/100)*$data_array[9])+$data_array[9]);
$vatspecialsprice=sprintf("%01.".DIGITS_AFTER_DOT."f",(($steuer/100)*$data_array[8])+$data_array[8]);
}
else
{
$vatprice=sprintf("%01.".DIGITS_AFTER_DOT."f",$data_array[9]);
$vatspecialsprice=sprintf("%01.".DIGITS_AFTER_DOT."f",$data_array[8]);
}
if(SHOW_PRICES)
{
// NH, wenn es keinen Rand gibt, Zusatz eines kleinen separateur
/* if (!PRODUCTS_BORDER) {
$this->Cell($data_array[0]+6,5,"",0,0);
// $x=$this->GetX();
// $y=$this->GetY();
$this->Cell($this->text_fw,1,"",0,'C');
//$this->LineString($x+3,$y," ",2);
$this->Line($x+4,$y,$x+15,$y);
} */
if(strlen($data_array[8])) //If special price
{
//$y=-5;
//$x=$this->GetX();
// $y=$this->SetY(0);
$specials_price_color_table=explode(",",SPECIALS_PRICE_COLOR);
$this->SetTextColor($specials_price_color_table[0],$specials_price_color_table[1],$specials_price_color_table[2]);
$this->SetFont('Arial','B','');
if(CURRENCY_RIGHT_OR_LEFT == 'R') {
$this->Cell(25,8,$vatprice.CURRENCY."\t\t\t".$vatspecialsprice.CURRENCY,PRODUCTS_BORDER,'L'); // die Hinzufügung eines param,1 gefüllt die Grundfarbe );
} else if (CURRENCY_RIGHT_OR_LEFT == 'L') {
$this->Cell($this->text_fw,8,CURRENCY.$vatprice."\t\t\t".CURRENCY.$vatspecialsprice,PRODUCTS_BORDER,'L'); // die Hinzufügung eines param,1 gefüllt die Grundfarbe );
} else {
echo "<b>Choose L or R for CURRENCY_RIGHT_OR_LEFT</b>";
exit();
}
//$x=$this->SetX(176);
$this->LineString('176',$y,$vatprice.CURRENCY,8);
}
else if(strlen($data_array[9]))
{
// $y=-5;
if(CURRENCY_RIGHT_OR_LEFT == 'R') {
$this->Cell(25,8,$vatprice.CURRENCY,PRODUCTS_BORDER,'L');
}else if(CURRENCY_RIGHT_OR_LEFT == 'L') {
$this->Cell($this->text_fw,8,CURRENCY.$vatprice,PRODUCTS_BORDER,'L');
} else {
echo "<b>Choose L or R for CURRENCY_RIGHT_OR_LEFT</b>";
exit();
}
}
$this->SetTextColor(0,0,0);
}
$y2=$this->GetY();
// wenn die Beschreibung des Produktes nicht die ganze Seite nimmt
if($h< $this->ifh)
{
$this->CalculatedSpace($y1,$y2,$data_array[1]);
}
else
{
$this->Ln(5);
}
}
function CategoriesTree($languages_id,$languages_code)
{
//selectionne all categories
$query = "SELECT c.categories_id, cd.categories_name, c.parent_id
FROM " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd
WHERE c.categories_id = cd.categories_id and cd.language_id='" . $languages_id ."'
ORDER by sort_order, cd.categories_name";
$categories_query = tep_db_query($query);
while ($categories = tep_db_fetch_array($categories_query)) {
//Count of chopping
$foo[$categories['categories_id']] = array(
'name' => $categories['categories_name'],
'parent' => $categories['parent_id']);
}
$this->Order(0, 0, $foo, '');
$this->AddPage();
$this->TitreChapitre("");
if (SHOW_INTRODUCTION) {
$this->Ln(18);
$file= DIR_FS_CATALOG_LANGUAGES . tep_get_languages_directory($languages_code) . '/pdf_define_intro.php';
// echo "<br>HHHH " . $file;
if (file_exists($file)) {
$file_array = @file($file);
$file_contents = @implode('', $file_array);
$this->MultiCell(0,6,strip_tags($file_contents),$this->ifw,1,'J');
}
}
$this->SetFont('Arial','',DIRECTORIES_TREE_FONT_SIZE);
if (SHOW_TREE) {
$this->Ln(15);
$this->MultiCell(0,6,$this->categories_string_spe,0,1,'L');
}
}
// Revision the function for MYSQL 5
function CategoriesListing($languages_id, $languages_code)
{
$this->products_index_array=array();
$this->products_index_list='';
$this->index_lenght=0;
//Recuperation de toutes les categories dans l'ordre
$categoriesidarray=explode(" ",$this->categories_id);
$categoriesnamearray=explode("\n",$this->categories_string);
$categorieslevelsarray=explode(" ",$this->levels);
//Convertion pixels -> mm
$imagewidth=SMALL_IMAGE_WIDTH*PDF_TO_MM_FACTOR;
$imageheight=SMALL_IMAGE_HEIGHT*PDF_TO_MM_FACTOR;
for($i=0; $i<sizeof($categoriesidarray)-1; $i++) {
$category_count_products = tep_products_in_category_count($categoriesidarray[$i],'false');
if (!((!SHOW_EMPTY_CATEGORIES) and ($category_count_products < 1))) {
$taille=0;
$current_category_id=$categoriesidarray[$i];
$current_category_name=$categoriesnamearray[$i];
$current_category_level=$categorieslevelsarray[$i];
$requete_prod="select p.products_id, pd.products_name, pd.products_description, p.products_image, p.products_model, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, p.products_date_added, m.manufacturers_name from ((" . TABLE_PRODUCTS . " p) left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id='".$current_category_id."' order by pd.products_name, p.products_date_added DESC";
$SHOW_catalog_query = tep_db_query($requete_prod);
while ($print_catalog = tep_db_fetch_array($SHOW_catalog_query)) {
$print_catalog_array[$taille++] = array(
'id' => $print_catalog['products_id'],
'name' => $print_catalog['products_name'], 'description' => $print_catalog['products_description'],
'model' => $print_catalog['products_model'],
'image' => $print_catalog['products_image'],
'price' => $print_catalog['products_price'], 'specials_price' => $print_catalog['specials_new_products_price'],
'tax_class_id' => $print_catalog['products_tax_class_id'],
'date_added' => tep_date_long($print_catalog['products_date_added']),
'manufacturer' => $print_catalog['manufacturers_name']);
}
//Forschung der Name der Vaterkategorie
// Revision $parent_category_name for PHP 5
$this->parent_category_name='';
$this->ParentsName($current_category_level,$i,$categorieslevelsarray, $categoriesnamearray);
if (($current_category_level == 1) and (CATEGORIES_PAGE_SEPARATOR)) {
$this->AddPage();
$this->Ln(120);
$this->SetFont('Arial','',12);
$titles_color_table=explode(",",CENTER_TITLES_CELL_COLOR);
$this->SetFillColor($titles_color_table[0], $titles_color_table[1], $titles_color_table[2]);
$this->Cell(45,5,"",0,0);
$this->MultiCell(100,10,$current_category_name,1,'C',1);
}
if ($taille > 0) { // nonempty category
// $this->AddPage(); // beginnt neue Kategorie mit neuer Seite
// Revision $parent_category_name for PHP 5
if (strlen($this->parent_category_name) > 0 ) {
$this->TitreChapitre($this->parent_category_name. CATEGORIES_SEPARATOR .$current_category_name);
} else {
$this->TitreChapitre($current_category_name);
}
$this->Ln(3); // NH
$this->SetFont('Arial','',11);
for($j=0; $j<$taille; $j++ ) {
// NH if not image definie, image by default
if (strlen($print_catalog_array[$j]['image']) > 0) {
$imagepath=DIR_FS_CATALOG.DIR_WS_IMAGES.$print_catalog_array[$j]['image'];
} else {
$imagepath=DIR_FS_CATALOG.DIR_WS_IMAGES.'/'.DEFAULT_IMAGE;
}
$id=$print_catalog_array[$j]['id'];
$name=rtrim(strip_tags($print_catalog_array[$j]['name']));
$model=rtrim(strip_tags($print_catalog_array[$j]['model']));
$description=rtrim(strip_tags($print_catalog_array[$j]['description']));
$manufacturer=rtrim(strip_tags($print_catalog_array[$j]['manufacturer']));
$price=rtrim(strip_tags($print_catalog_array[$j]['price']));
$specials_price=rtrim(strip_tags($print_catalog_array[$j]['specials_price']));
$tax_class_id=rtrim(strip_tags($print_catalog_array[$j]['tax_class_id']));
$date_added=rtrim(strip_tags($print_catalog_array[$j]['date_added']));
$data_array=array($imagewidth,$imageheight,$name,$model,$date_added,$manufacturer,$description,$tax_class_id,$specials_price,$price,$id,$languages_code,$imagepath);
$this->Ln(PRODUCTS_SEPARATOR); // NH blank space before the products description cells
$this->DrawCells($data_array);
if (SHOW_INDEX) {
switch (INDEX_EXTRA_FIELD) {
case 1 : $this->PrepareIndex($name,$manufacturer,$current_category_name);
break;
case 2 : $this->PrepareIndex($name,$model,$current_category_name);
break;
case 3 : $this->PrepareIndex($name,$date_added,$current_category_name);
break;
default : $this->PrepareIndex($name,"",$current_category_name);
}
}
}
}
}
}
}[/code]
Merci !