Jump to content

Opencart, undefined index


blmg2009

Recommended Posts

I'm trying to add a checkbox to remove a print status I have created form all orders. 

 

The checkbox is below, notify check box on the history tab in the order info page. 

 

   
<td><?php echo $entry_remove_print_status; ?></td>
<td><input type="checkbox" name="unprinted" value="1" /></td>

 

as the per the controller 

 


$this->model_sale_order->addOrderHistory($this->request->get['order_id'], $this->request->post);

 

The above code will send all post data to the method addOrderHistory. 

 

in the model I have created. 

 


if($data['unprinted'])
{
$this->db->query("UPDATE `" . DB_PREFIX . "order` SET `printed` = '0' WHERE order_id = '" . (int)$order_id . "'");
}

 

However the system doesn't seem to be recognizing the $data['unprinted'], what is it i'm doing wrong?

 

I'm new to opencart development so it could me something so simple. 

 

Thanks for reading.

Link to comment
https://forums.phpfreaks.com/topic/292728-opencart-undefined-index/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.