Details
-
Bug
-
Resolution: Invalid
-
Medium
-
None
-
None
-
None
-
Operating System: Centos 5
PHP Version: PHP 5.2.9 (cli)
Database and version: mysql Ver 14.12 Distrib 5.0.45
Browser (and version): Firefox 3.0.11
Description
If you make an order which uses a newly created order status (not one of the options 1-3 that come as default) then it doesn't show the status history while viewing an order.
+----+------------+-------------+----------+-----------+ | id | modified | modifier_id | order_id | status_id | +----+------------+-------------+----------+-----------+ | 46 | 1247845237 | 600 | 26 | 7 | +----+------------+-------------+----------+-----------+
If you change the SQL from:
$rows = $db->arrayQuery( "SELECT ezorder_status_history.*, ezorder_status.name AS status_name\n" . "FROM ezorder_status_history, ezorder_status\n" . "WHERE order_id = $orderID AND\n" . " ezorder_status.status_id = ezorder_status_history.status_id\n" . "ORDER BY ezorder_status_history.modified DESC" );
to:
$rows = $db->arrayQuery( "SELECT ezorder_status_history.*, ezorder_status.name AS status_name\n" . "FROM ezorder_status_history, ezorder_status\n" . "WHERE order_id = $orderID AND\n" . " ezorder_status.id = ezorder_status_history.status_id\n" . "ORDER BY ezorder_status_history.modified DESC" );
So that it uses the ezorder_status' id column rather than status_id it works. Or the order_status_history needs to store the proper status_id value.
Steps to reproduce
Log into the admin interface and go to Webshop. Click Order status in the left menu. Add a new order status.
Create an order that uses this status.
View that order and look to the bottom of the screen where the status history is. You should see the number of entries beside the "Status history" heading but no details of them.