Problème d'affichage facturation PDF, Les attributs se chevauchent systématiquement |
Bienvenue invité ( Connexion | Inscription )
Problème d'affichage facturation PDF, Les attributs se chevauchent systématiquement |
27 Nov 2014, 16:42
Message
#1
|
|
Ceinture jaune+ OSC Groupe : Membres Messages : 153 Inscrit : 22-October 07 Membre no 19482 |
Bonjour à tous ,
Voici mon soucis: Je fait une facturation par PDF, j'ai bien réussi à construire ma facturation correctement, mais en ce qui concerne les attributs, ceux-ci se chevauchent, et je ne parviens pas à afficher le résultat en multilignes. Quelqu'un a t-il déjà rencontré ce problème ? Voir une suggestion ? En vous remerciant par avance, voici le code concerné vers la ligne 277 de invoice.php (PDF). Code //Show the products information line by line
for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) { $pdf->SetFont('Arial','',9); $pdf->SetY($Y_Table_Position); $pdf->SetX(6); $pdf->MultiCell(8,6,$order->products[$i]['qty'],1,'C'); if (isset($order->products[$i]['attributes']) && (($k = sizeof($products->products[$i]['attributes'])) > 0)) { for ($j = 0; $j < $k; $j++) { $pdf->SetY($Y_Table_Position); $pdf->SetX(39); $pdf->MultiCell(123,6,$order->products[$i]['name'] . ' - ' . $order->products[$i]['attributes'][$j]['option'] . ' : ' . $order->products[$i]['attributes'][$j]['value'],1,'L'); } } if (isset($order->products[$i]['attributes']) && (($k = sizeof($order->products[$i]['attributes'])) > 0)) { for ($j = 0; $j < $k; $j++) { $pdf->SetY($Y_Table_Position); $pdf->SetX(39); $pdf->MultiCell(123,6,$order->products[$i]['name'] . ' - ' . $order->products[$i]['attributes'][$j]['option'] . ' : ' . $order->products[$i]['attributes'][$j]['value'],1,'L'); } } -------------------- J'utilise OScommerce MS2.2 (modifié pour php5) - Ebergeur LWS - Download Controller - Contrib PayPal IPN
Machine Mac Pro - Lion 10.7. 5 - Mamp |
|
30 Nov 2014, 14:42
Message
#2
|
|
Ceinture jaune+ OSC Groupe : Membres Messages : 153 Inscrit : 22-October 07 Membre no 19482 |
Bonjour,
J'ai essayé de faire une boucle en dur, car les id d'options sont toujours les mêmes, mais je ne parviens pas a séparer les options qui se chevauchent par un - par exemple. Il n'est pas nécessaire qu'il y ai un retour à la ligne, même à la limite je prefère une seule ligne. Voici mon code: Code $pdf->SetFont('Arial','',9);
$pdf->SetY($Y_Table_Position); $pdf->SetX(6); $pdf->MultiCell(9,6,$order->products[$i]['qty'],1,'C'); if (isset($order->products[$i]['attributes']) && (($k = sizeof($products->products[$i]['attributes'])) > 0)) { for ($j = 0; $j < $k; $j++) { $pdf->SetY($Y_Table_Position); $pdf->SetX(70); $pdf->MultiCell(92,6,$order->products[$i]['name'] . ' - ' . $order->products[$i]['attributes'][$j]['option_id = 15'] . ' - ' . $order->products[$i]['attributes'][$j]['option_id = 18'] . ':' . $order->products[$i]['attributes'][$j]['value'] ,1,'L'); } } if (isset($order->products[$i]['attributes']) && (($k = sizeof($order->products[$i]['attributes'])) > 0)) { for ($j = 0; $j < $k; $j++) { $pdf->SetY($Y_Table_Position); $pdf->SetX(70); $pdf->MultiCell(92,6,$order->products[$i]['name'] . ' - ' . $order->products[$i]['attributes'][$j]['option_id = 15'] . ' - ' . $order->products[$i]['attributes'][$j]['option_id = 18'] . ':' . $order->products[$i]['attributes'][$j]['value'] ,1,'L'); } } -------------------- J'utilise OScommerce MS2.2 (modifié pour php5) - Ebergeur LWS - Download Controller - Contrib PayPal IPN
Machine Mac Pro - Lion 10.7. 5 - Mamp |
|
Version bas débit | Nous sommes le : 28th March 2024 - 14:12 |
Ce site est déclaré auprès de la commision Nationale de l'Informatique et des Libertés (déclaration n°: 1043896) |