试试这个,
首先修改控制器中的数据数组(/admin/controller/sale/order.php)添加order_status_id和admin cmets/histories:
$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']),
'status' => $order_info['order_status_id'],
'admin_comments' => $this->model_sale_order->getOrderHistories($order_id)
);
然后您可以在 order_invoice.tpl 视图的末尾添加:
<?php if ($order['status'] == 3) { ?>
<table class="comment">
<tr class="heading">
<td><b><?php echo $column_comment; ?></b></td>
</tr>
<?php foreach ($order['admin_comments'] as $admin_comment) { ?>
<?php if ($admin_comment['status'] == 'Shipped') { ?>
<tr>
<td><?php echo $admin_comment['comment']; ?></td>
</tr>
<?php } ?>
<?php } ?>
</table>
<?php } ?>
</div>
<?php } ?>
</body>
</html>
order_status_id == 3 正在发货。