Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2012
    Posts
    28
    Plugin Contributions
    0

    Default Number of Orders - shown on Invoice

    Hi
    Happy New Year.
    Could anyone help me get the "number of orders" information (as seen when looking at admin - customers) printed on the invoices.

    This would be very useful for packing order e.g.: if first order then include full brochure etc.

    Ideal way would be a suffix to order number: e.g instead of 1234 it could be 1234-3 for third order from customer etc.

    Thanks

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    67,390
    Plugin Contributions
    6

    Default Re: Number of Orders - shown on Invoice

    You could customize the file:
    /your_secret_admin/invoice.php

    with the code in RED:
    Code:
          <tr>
            <td class="main"><b><?php echo ENTRY_PAYMENT_METHOD; ?></b></td>
            <td class="main"><?php echo $order->info['payment_method']; ?></td>
          </tr>
    <?php
    // bof: number of orders
             $customers_orders = $db->Execute("select o.orders_id,  o.date_purchased, o.order_total, o.currency,  o.currency_value                                          from " .  TABLE_ORDERS . " o
                                              where customers_id='" . $order->customer['id'] . "'");
    ?>
          <tr>
            <td class="main"><b><?php echo 'Number of Orders: '; ?></b></td>
            <td class="main"><?php echo $customers_orders->RecordCount(); ?></td>
          </tr>
    <?php
    // eof: number of orders
    ?>
        </table></td>
    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.3]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  3. #3
    Join Date
    Nov 2012
    Posts
    28
    Plugin Contributions
    0

    Default Re: Number of Orders - shown on Invoice

    Quote Originally Posted by Ajeh View Post
    You could customize the file:
    /your_secret_admin/invoice.php

    with the code in RED:
    Code:
          <tr>
            <td class="main"><b><?php echo ENTRY_PAYMENT_METHOD; ?></b></td>
            <td class="main"><?php echo $order->info['payment_method']; ?></td>
          </tr>
    <?php
    // bof: number of orders
             $customers_orders = $db->Execute("select o.orders_id,  o.date_purchased, o.order_total, o.currency,  o.currency_value                                          from " .  TABLE_ORDERS . " o
                                              where customers_id='" . $order->customer['id'] . "'");
    ?>
          <tr>
            <td class="main"><b><?php echo 'Number of Orders: '; ?></b></td>
            <td class="main"><?php echo $customers_orders->RecordCount(); ?></td>
          </tr>
    <?php
    // eof: number of orders
    ?>
        </table></td>
    BRILLIANT. Thank you so much!!

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    67,390
    Plugin Contributions
    6

    Default Re: Number of Orders - shown on Invoice

    You are most welcome ... thanks for the update that this worked for you ...
    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.3]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  5. #5
    Join Date
    Jul 2011
    Location
    FLORIDA US
    Posts
    6
    Plugin Contributions
    0

    Default Re: Number of Orders - shown on Invoice

    This is absolutely perfect for my uses also. I added the code to my 1.5.1 version and it works like a charm!
    Thanks Ajeh

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    67,390
    Plugin Contributions
    6

    Default Re: Number of Orders - shown on Invoice

    Thanks for the update that this works for you ...
    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.3]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  7. #7
    Join Date
    Apr 2006
    Location
    Largo, Florida USA
    Posts
    101
    Plugin Contributions
    0

    Default Re: Number of Orders - shown on Invoice

    I was able to add it to my orders.php and MaxMindOrders.php page as well my question is How Can I Add The Number To The Order Status Box In Upper Right Corner On My Admin Page So I See Info?

 

 

Similar Threads

  1. Getting Duplicate Invoice Number and Invoice not showing up
    By jennysack in forum General Questions
    Replies: 1
    Last Post: 19 Aug 2011, 02:53 PM
  2. Make orders.php Invoice button print invoice rather than display it
    By dinki in forum Contribution-Writing Guidelines
    Replies: 0
    Last Post: 28 Sep 2009, 03:28 PM
  3. Looking to add print invoice and shipp invoice from admin---> orders
    By r4fdud in forum Upgrading from 1.3.x to 1.3.9
    Replies: 0
    Last Post: 15 Mar 2009, 11:21 PM
  4. No shipping shown on invoice
    By intcon in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 2 Oct 2008, 02:22 PM
  5. No shipping shown on invoice
    By intcon in forum Managing Customers and Orders
    Replies: 1
    Last Post: 2 Oct 2008, 07:37 AM

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
  •