Basically we need to know if the order has ever had 'complete' as a status, and amend a couple of other options in the template accordingly.
controller/sale/order.php has been modified as follows;
Code: Select all
$this->data['has_completed'] = 0;
foreach ($results as $result) {
$this->data['histories'][] = array(
'notify' => $result['notify'] ? $this->language->get('text_yes') : $this->language->get('text_no'),
'status' => $result['status'],
'comment' => nl2br($result['comment']),
'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])));
if ($result['status'] == "Complete") { $this->data['has_completed'] = 1; }
}
This worked fine in 1.4, and if I add var_dump($this->data); into the controller I can see the variable has been set, but the template just presents the following;
Notice: Undefined variable: has_completed in /store/admin/view/template/sale/order_info.tpl on line 96
Any advice anyone can offer would be much appreciate, other changes (to add a couple of tabs to the order_info.tpl) have worked as expected.. but this has me vexed.