Results 1 to 6 of 6
  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

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Order Comments on Invoice - Code

    Thanks for the update ... always a help to see ...

    NOTE: this has been added to the upcoming v1.3.8 with options for:
    Do you want to display the Order Comments on the Admin Packing Slip?
    0= OFF
    1= First Comment by Customer only
    2= All Comment for the Order
    Just a handy thing to know ... for upgrades ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Jun 2007
    Location
    Fl.
    Posts
    16
    Plugin Contributions
    0

    Default Re: Order Comments on Invoice - Code

    This worked Great! Thank you, just what I needed.

  4. #4
    Join Date
    Jun 2007
    Posts
    10
    Plugin Contributions
    0

    Default Re: Order Comments on Invoice - Code

    Here comes a stupid one but where in the admin do you make the change to view the comments? I can't find it - I get lost sometimes.. Thanks!!

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Order Comments on Invoice - Code

    In Zen Cart v1.3.8 ...

    I thought tucking those order and customer comments for the invoice and packing slip in the Configuration ...Shipping/Packaging made sense ...
    Display Order Comments on Admin Invoice
    Do you want to display the Order Comments on the Admin Invoice?
    0= OFF
    1= First Comment by Customer only
    2= All Comments for the Order
    Display Order Comments on Admin Packing Slip
    Do you want to display the Order Comments on the Admin Packing Slip?
    0= OFF
    1= First Comment by Customer only
    2= All Comments for the Order
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  6. #6
    Join Date
    Jun 2007
    Posts
    10
    Plugin Contributions
    0

    Default Re: Order Comments on Invoice - Code

    I agree!

    I only see:

    Country of origin
    postal code
    max package wt
    small to medium
    large pckges
    display number of boxes
    order free shipping
    shipping estimator display

    I don't see anything about displaying comments..

    I have 1.3.7 though.. that might be why. Ha.

    Is there much to do to upgrade from 1.3.7 to .8 ? The only major mod I have installed are; edit orders and my own credit card mod..

 

 

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