Code: Select all
$this->data['order_comment'] = nl2br($order_info['comment']);
Code: Select all
public function invoice() {
$this->load->language('customer/order');
Code: Select all
$this->data['order_comment'] = nl2br($order_info['comment']);
Code: Select all
public function invoice() {
$this->load->language('customer/order');
Code: Select all
<?php echo $order['comment']; ?>
Code: Select all
'invoice_id' => $invoice_id,
Code: Select all
'comments' => $order_info['comments'],
Code: Select all
</table>
</div>
<?php } ?>
</body>
</html>
Code: Select all
<tr>
<td>Comments:</td>
<td><?php echo $order['comments']; ?></td>
</tr>
Code: Select all
$this->data['order_comment'] = nl2br($order_info['comment']);
I'm also getting an Undefined Index error. Where in admin/controller/sale/order.php does one place the above line?matthew@wormsetc.com wrote:That was close, but I could not get it to work. It gave an undefined index error.
However in my stubborn persistence I figured that you also needed to add the following on admin/controller/sale/order.php in the invoices.tpl section.
Code: Select all
$this->data['order_comment'] = nl2br($order_info['comment']);
That's right. Any solution for this?hamasaki wrote:I`ve just downloaded the latest version and comments are not shown on the order.Qphoria wrote:FYI this has been added to 1.4.8
"I know that you cannot live on hope alone, but without it, life is not worth living." — Harvey Milk
Tikus Farm - Tikus Putih
Code: Select all
$_['column_comment'] = 'Comment';
Code: Select all
$_['column_comment'] = 'Customer Comments';
$_['column_order_comment'] = 'Order Comments';
Code: Select all
$this->data['column_comment'] = $this->language->get('column_comment');
$this->data['logo'] = DIR_IMAGE . $this->config->get('config_logo');
Code: Select all
$this->data['column_comment'] = $this->language->get('column_comment');
$this->data['column_order_comment'] = $this->language->get('column_order_comment');
$this->data['logo'] = DIR_IMAGE . $this->config->get('config_logo');
Code: Select all
$total_data = $this->model_sale_order->getOrderTotals($order_id);
$this->data['orders'][] = array(
'order_id' => $order_id,
'invoice_id' => $invoice_id,
'date_added' => date($this->language->get('date_format_short'), strtotime($order_info['date_added'])),
'store_name' => $order_info['store_name'],
'store_url' => rtrim($order_info['store_url'], '/'),
'address' => nl2br($this->config->get('config_address')),
'telephone' => $this->config->get('config_telephone'),
'fax' => $this->config->get('config_fax'),
'email' => $this->config->get('config_email'),
'shipping_address' => $shipping_address,
'payment_address' => $payment_address,
'customer_email' => $order_info['email'],
'ip' => $order_info['ip'],
'customer_telephone'=> $order_info['telephone'],
'comment' => $order_info['comment'],
'product' => $product_data,
'total' => $total_data
);
Code: Select all
$total_data = $this->model_sale_order->getOrderTotals($order_id);
$order_comment = '';
$order_history = $this->model_sale_order->getOrderHistory($order_id);
$last_history_item = $order_history[sizeof($order_history)-1];
if(strpos($last_history_item['comment'], 'AVSCODE') === false) {
$order_comment = nl2br($last_history_item['comment']);
}
$this->data['orders'][] = array(
'order_id' => $order_id,
'invoice_id' => $invoice_id,
'date_added' => date($this->language->get('date_format_short'), strtotime($order_info['date_added'])),
'store_name' => $order_info['store_name'],
'store_url' => rtrim($order_info['store_url'], '/'),
'address' => nl2br($this->config->get('config_address')),
'telephone' => $this->config->get('config_telephone'),
'fax' => $this->config->get('config_fax'),
'email' => $this->config->get('config_email'),
'shipping_address' => $shipping_address,
'payment_address' => $payment_address,
'customer_email' => $order_info['email'],
'ip' => $order_info['ip'],
'customer_telephone'=> $order_info['telephone'],
'comment' => $order_info['comment'],
'order_comment' => $order_comment,
'product' => $product_data,
'total' => $total_data
);
Code: Select all
<table class="product">
<tr class="heading">
<td><b><?php echo $column_comment; ?></b></td>
</tr>
<tr>
<td><?php echo $order['comment']; ?></td>
</tr>
</table>
Code: Select all
<?php if(strlen($order['order_comment'])>0) { ?>
<table class="product">
<tr class="heading">
<td><b><?php echo $column_order_comment; ?></b></td>
</tr>
<tr>
<td><?php echo $order['order_comment']; ?></td>
</tr>
</table>
<?php } ?>
<?php if(strlen($order['comment'])>0) { ?>
<table class="product">
<tr class="heading">
<td><b><?php echo $column_comment; ?></b></td>
</tr>
<tr>
<td><?php echo $order['comment']; ?></td>
</tr>
</table>
<?php } ?>
I know this is just over a year old now(!) but just did this on 1.4.9.4 with slight modification it workedJeremy54 wrote:This will show the last comment in your order history on the invoice - good for notifying customer of any issues with their order on the invoice page. Tested and working for 1.4.8
If I forgot to mention: it's OpenCart Vv1.5.6
lloydmedley, the only things that need to be changed for 1.5.6.4 in Jeremy54's ABSOLUTELY FANTASTIC code (tks heaps btw) is below:lloydmedley wrote:Anyone know how to get ths working with 1.5.x?
replace with:Jeremy54 wrote: $order_history = $this->model_sale_order->getOrderHistory($order_id);
Code: Select all
$order_history = $this->model_sale_order->getOrderHistories($order_id);
Code: Select all
$this->data['orders'][] = array(
'order_id' => $order_id,
'invoice_no' => $invoice_no,
'date_added' => date($this->language->get('date_format_short'), strtotime($order_info['date_added'])),
'store_name' => $order_info['store_name'],
'store_url' => rtrim($order_info['store_url'], '/'),
'store_address' => nl2br($store_address),
'store_email' => $store_email,
'store_telephone' => $store_telephone,
'store_fax' => $store_fax,
'email' => $order_info['email'],
'telephone' => $order_info['telephone'],
'shipping_address' => $shipping_address,
'shipping_method' => $order_info['shipping_method'],
'payment_address' => $payment_address,
'payment_company_id' => $order_info['payment_company_id'],
'payment_tax_id' => $order_info['payment_tax_id'],
'payment_method' => $order_info['payment_method'],
'product' => $product_data,
'voucher' => $voucher_data,
'total' => $total_data,
'comment' => nl2br($order_info['comment'])
);
Code: Select all
$this->data['orders'][] = array(
'order_id' => $order_id,
'invoice_no' => $invoice_no,
'date_added' => date($this->language->get('date_format_short'), strtotime($order_info['date_added'])),
'store_name' => $order_info['store_name'],
'store_url' => rtrim($order_info['store_url'], '/'),
'store_address' => nl2br($store_address),
'store_email' => $store_email,
'store_telephone' => $store_telephone,
'store_fax' => $store_fax,
'email' => $order_info['email'],
'telephone' => $order_info['telephone'],
'shipping_address' => $shipping_address,
'shipping_method' => $order_info['shipping_method'],
'payment_address' => $payment_address,
'payment_company_id' => $order_info['payment_company_id'],
'payment_tax_id' => $order_info['payment_tax_id'],
'payment_method' => $order_info['payment_method'],
'product' => $product_data,
'voucher' => $voucher_data,
'total' => $total_data,
'order_comment' => $order_comment,
'comment' => nl2br($order_info['comment'])
);
Users browsing this forum: 7cswinery and 103 guests