1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| //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(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'] . ':' . $order->products[$i]['attributes'][$j]['value'] ,1,'0');
}
}
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'] . ':' . $order->products[$i]['attributes'][$j]['value'] ,1,'0');
}
} |
Partager