
Originally Posted by
Ajeh
You can pull any field from the products table with the function zen_products_lookup, for example:
zen_products_lookup($product_id, 'products_weight')
for the $products_id ... I believe you should be able to use:
$order->products[$i]['id']
You may need to experiment with this a bit, I have not tried it ...
so my guess is that i need to add something in between here in the packingslip.php code?
PHP Code:
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr class="dataTableHeadingRow">
<td class="dataTableHeadingContent" colspan="2"><?php echo TABLE_HEADING_PRODUCTS; ?></td>
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS_MODEL; ?></td>
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS_MANUFACTURER; ?></td>
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS_DESCRIPTION; ?></td>
</tr>
<?php
for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
echo ' <tr class="dataTableRow">' . "\n" .
' <td class="dataTableContent" valign="top" align="right">' . $order->products[$i]['qty'] . ' x</td>' . "\n" .
' <td class="dataTableContent" valign="top">' . $order->products[$i]['name'];
if (isset($order->products[$i]['attributes']) && (sizeof($order->products[$i]['attributes']) > 0)) {
for ($j=0, $k=sizeof($order->products[$i]['attributes']); $j<$k; $j++) {
echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br(zen_output_string_protected($order->products[$i]['attributes'][$j]['value']));
echo '</i></small></nobr>';
}
}
echo ' </td>' . "\n" .
' <td class="dataTableContent" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n" .
' <td class="dataTableContent" valign="top">' . $order->products[$i]['manufacturer'] . '</td>' . "\n" .
' <td class="dataTableContent" valign="top">' . $order->products[$i]['description'] . '</td>' . "\n" .
' </tr>' . "\n";