Page 1 of 1

order status colour extension failing

Posted: Thu Jun 19, 2025 5:59 pm
by motofox
Im running opencart 4.1.0.3 and recently purchased modualpoints order status colour which worked fine on oc version 4.0.0.0.

Its installed fine and runs as it should in the admin and displays colour status, the problem is when i click on an order to view it in admin, instead of opening up the order, it goes to the store front with an error page. Disabling the extension order page acts normal.

Here is the error log for this

2025-06-19 09:41:12 - PHP Warning: Undefined array key "status" in /home/u*********/domains/towerfencing.com/public_html/extension/mporderstatuscolor/admin/controller/module/mporderstatuscolor.php on line 484


This is the code from line 484:
if (!isset($order_status_ids[$value['status']])) {
$query = $this->db->query("SELECT `order_status_id` FROM `" . DB_PREFIX . "order_status` WHERE `language_id`='". (int)$this->config->get('config_language_id') ."' AND `name`='". $this->db->escape($value['status']) ."'");
if ($query->num_rows) {
$order_status_ids[$value['status']] = $query->row['order_status_id'];
}

Ive emailed modualpoint support multiple times and im getting no response so hopefully i can work this out with help?

Re: order status colour extension failing

Posted: Thu Jun 19, 2025 6:55 pm
by ADD Creative
The error suggest that $value['status'] hasn't been set. As the error is in one of the files added by the extension, which nobody on the forum will likely have access to, you will need to get the extension developer to fix it or get another developer to look at your store.

Re: order status colour extension failing

Posted: Thu Jun 19, 2025 10:02 pm
by by mona
Ditto above plus the option to use the button on the right on the marketplace page for assistance if you purchased it from the marketplace

Re: order status colour extension failing

Posted: Sat Jun 21, 2025 2:55 am
by khnaz35
While you are waiting you can try this fix.
Note i don't have extension and this is not tested always make a backup of file before applying any code changes.

Code: Select all

if (isset($value['status']) && !isset($order_status_ids[$value['status']])) {
    $query = $this->db->query("SELECT `order_status_id` FROM `" . DB_PREFIX . "order_status` WHERE `language_id`='" . (int)$this->config->get('config_language_id') . "' AND `name`='" . $this->db->escape($value['status']) . "'");
    if ($query->num_rows) {
        $order_status_ids[$value['status']] = $query->row['order_status_id'];
    }
}