Page 1 of 1

opencart 1.3 - Comments order fixes

Posted: Thu Aug 06, 2009 6:14 pm
by jeannenot
Hello,

I've found some bugs with the comments orders.

1/ The update query in admin / model / customer / order don't save the comments in the order table :

open the file admin / model / customer / order.php and replace the update query (line four) with :

$this->db->query("UPDATE `" . DB_PREFIX . "order` SET order_status_id = '" . (int)$data['order_status_id'] . "', date_modified = NOW(), comment = '" . $this->db->escape(strip_tags($data['comment'])) ."' WHERE order_id = '" . (int)$order_id . "'");

2/ The comment is not display to the user, so :

a) open the file admin / controller / customer / order.php

b) replace the line :
$this->data['comment'] = @$this->request->post['comment'];

with:

if (isset($this->request->post['comment'])) {
$this->data['comment'] = $this->request->post['comment'];
} else {
$this->data['comment'] = @$order_info['comment'];
}


it's all ! :D

Re: opencart 1.3 - Comments order fixes

Posted: Fri Aug 07, 2009 8:17 pm
by jeannenot
Hi,

Not follow the b point for this fix. it's a mistake :P

Re: opencart 1.3 - Comments order fixes

Posted: Fri Aug 07, 2009 8:57 pm
by Daniel
there is nothing wrong with the comments!!