I run a project which currently runs on Open Cart 1.4.9 and I was wondering how I could get open cart to display the customer's number on the invoice. In the database there is a point called "customer_id" but so far my attempts to implement this number with the order_invoice.tpl have failed so far .
Does anyone of you folks out there any idea?
cheerio
Additionally, if the customer is a guest and does not have a reliable account to which the merchant can refer to, it wouldn't quite be useful in this case.
AFAIK, the customer's email is already stored on the order's invoice.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
So it's greatly appreciated if you or anyone else has any idea on how to make this work .
cheerio
Code: Select all
$this->data['text_order_id'] = $this->language->get('text_order_id');
Code: Select all
$this->data['text_customer_id'] = $this->language->get('text_customer_id');
find:
Code: Select all
$_['text_order_id']
Code: Select all
$_['text_customer_id'] = 'Customer ID:';
find:
Code: Select all
<tr>
<td><b><?php echo $text_order_id; ?></b></td>
<td><?php echo $order['order_id']; ?></td>
</tr>
Code: Select all
<tr>
<td><b><?php echo $text_customer_id; ?></b></td>
<td><?php echo (int)$order['customer_id']; ?></td>
</tr>
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Well the thing that works just fine is showing the words "Customer ID" on the invoice. However it fails to display the actual custumer ID eg. 123.
Open Cart gives the follwing error instead of the actual cumstomer ID:
Notice: Undefined index: customer_id in ..admin\view\template\sale\order_invoice.tpl
Do you have any futher ideas regarding this matter?
cheerio
In admin/controller/sale/order.php file,
find:
Code: Select all
foreach ($orders as $order_id) {
Code: Select all
$this->data['text_customer_id'] = $this->language->get('text_customer_id');
$this->data['text_guest'] = $this->language->get('text_guest');
Code: Select all
'order_id' => $order_id,
Code: Select all
'customer_id' => $order_info['customer_id'],
In admin/language/english/sale/order.php file,
find:
Code: Select all
$_['text_maxmind_id']
Code: Select all
$_['text_customer_id'] = 'Customer ID: ';
$_['text_guest'] = 'Guest';
find:
Code: Select all
<tr>
<td><b><?php echo $text_order_id; ?></b></td>
<td><?php echo $order['order_id']; ?></td>
</tr>
Code: Select all
<tr>
<td><b><?php echo $text_customer_id; ?></b></td>
<td><?php echo (!empty($order['customer_id'])) ? (int)$order['customer_id'] : $text_guest; ?></td>
</tr>
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Thanks for the feedback jules2000.jules2000 wrote:It works like a charm now . Straightlight, I can't tell you how happy I am about the turn of events. Thank you sooo very much, you are my hero of the day. I didn't know what I would have done without you.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Users browsing this forum: No registered users and 94 guests