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
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>
Re: Number of Orders - shown on Invoice
Quote:
Originally Posted by
Ajeh
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!!
Re: Number of Orders - shown on Invoice
You are most welcome ... thanks for the update that this worked for you ... :smile:
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
Re: Number of Orders - shown on Invoice
Thanks for the update that this works for you ... :smile:
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?