How can I customize admin\packingslip.php and invoice.php to show only the customer comments in the comments section? When you turn these on in the admin:
Display Order Comments on Admin Invoice
Display Order Comments on Admin Packing
It places a table across the bottom of those documents with dates, check marks, and all the status updates of the orders, even if the Display Order Comments is set to "1".
All I want is for the customer comment from the order to appear on the admin invoice and admin packing. In our shop, we print the admin invoice and pull the products, so it helps to have any order comments right there on the sheet. The other stuff is not necessary.
Here is the relevant code
Code:<?php if (ORDER_COMMENTS_PACKING_SLIP > 0) { ?> <tr> <td class="main"><table border="1" cellspacing="0" cellpadding="5"> <tr> <td class="smallText" align="center"><strong><?php echo TABLE_HEADING_DATE_ADDED; ?></strong></td> <td class="smallText" align="center"><strong><?php echo TABLE_HEADING_CUSTOMER_NOTIFIED; ?></strong></td> <td class="smallText" align="center"><strong><?php echo TABLE_HEADING_STATUS; ?></strong></td> <td class="smallText" align="center"><strong><?php echo TABLE_HEADING_COMMENTS; ?></strong></td> </tr> <?php $orders_history = $db->Execute("select orders_status_id, date_added, customer_notified, comments from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . zen_db_input($oID) . "' order by date_added"); if ($orders_history->RecordCount() > 0) { $count_comments=0; while (!$orders_history->EOF) { $count_comments++; echo ' <tr>' . "\n" . ' <td class="smallText" align="center">' . zen_datetime_short($orders_history->fields['date_added']) . '</td>' . "\n" . ' <td class="smallText" align="center">'; if ($orders_history->fields['customer_notified'] == '1') { echo zen_image(DIR_WS_ICONS . 'tick.gif', ICON_TICK) . "</td>\n"; } else { echo zen_image(DIR_WS_ICONS . 'cross.gif', ICON_CROSS) . "</td>\n"; } echo ' <td class="smallText">' . $orders_status_array[$orders_history->fields['orders_status_id']] . '</td>' . "\n"; echo ' <td class="smallText">' . ($orders_history->fields['comments'] == '' ? TEXT_NONE : nl2br(zen_db_output($orders_history->fields['comments']))) . ' </td>' . "\n" . ' </tr>' . "\n"; $orders_history->MoveNext(); if (ORDER_COMMENTS_PACKING_SLIP == 1 && $count_comments >= 1) { break; } } } else { echo ' <tr>' . "\n" . ' <td class="smallText" colspan="5">' . TEXT_NO_ORDER_HISTORY . '</td>' . "\n" . ' </tr>' . "\n"; } ?> </table></td> </tr> <?php } // order comments ?> </table>



