Results 1 to 6 of 6

Threaded View

  1. #1
    Join Date
    May 2005
    Location
    Australia
    Posts
    334
    Plugin Contributions
    2

    Default Order Comments on Invoice - Code

    Greetings:

    Recently i added some code that i took from the Orders.php and added it to the Invoice.php. This means that now when i print my invoices it actually has the comments on the invoice as well.

    Here is the coding i added..

    <tr>
    <td><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
    </tr>
    <tr>
    <td class="main"><table border="0" width="85&#37;" cellspacing="0" cellpadding="2">
    <tr class="dataTableHeadingRow">
    <td class="dataTableHeadingContent" align="center" width="20%"><strong><?php echo TABLE_HEADING_DATE; ?></strong></td>
    <td class="dataTableHeadingContent" align="center" width="80%"><strong><?php echo TABLE_HEADING_ORDER_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) {
    while (!$orders_history->EOF) {
    echo ' <tr class="dataTableRow">' . "\n" .
    ' <td class="dataTableContent" align="left">' . zen_datetime_short($orders_history->fields['date_added']) . '</td>' . "\n";
    echo ' <td class="dataTableContent" align="left">' . nl2br(zen_db_output($orders_history->fields['comments'])) . '&nbsp;</td>' . "\n" .
    ' </tr>' . "\n";
    $orders_history->MoveNext();
    }
    } else {
    echo ' <tr>' . "\n" .
    ' <td class="smallText" colspan="5">' . TEXT_NO_ORDER_HISTORY . '</td>' . "\n" .
    ' </tr>' . "\n";
    }
    ?>
    </table>
    I added it below the following lines.

    <td class="main"><b><?php echo ENTRY_PAYMENT_METHOD; ?></b></td>
    <td class="main"><?php echo $order->info['payment_method']; ?></td>
    </tr>
    </table></td>
    </tr>
    But it is up to you where you stick it.

    You will also need to add this to the Language - invoice.php file.

    define('TABLE_HEADING_ORDER_COMMENTS', 'Order Comments');
    define('TABLE_HEADING_DATE', 'Date');
    I added it below

    define('TABLE_HEADING_COMMENTS', 'Comments');
    Last edited by Darkwander; 16 Jun 2007 at 04:10 AM. Reason: Forgot the Language code

 

 

Similar Threads

  1. PDF Order Centre-Where's the code generating shipping method text in invoice.php
    By gamenano in forum All Other Contributions/Addons
    Replies: 32
    Last Post: 23 Feb 2010, 07:19 PM
  2. Customer Comments on Invoice
    By welshop.com in forum Managing Customers and Orders
    Replies: 13
    Last Post: 5 Sep 2009, 12:39 AM
  3. Authorize.net (AIM) Putting AUTH: Code & TransID in order comments
    By nextlevelmotoring in forum General Questions
    Replies: 6
    Last Post: 3 Aug 2009, 07:57 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR