blmg2009 Posted November 26, 2014 Share Posted November 26, 2014 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. Quote Link to comment Share on other sites More sharing options...
QuickOldCar Posted November 29, 2014 Share Posted November 29, 2014 show the error you get here is it actually not seeing it in the $data array, or is it your logic echo $data['unprinted'] and see if has a value do a var_dump($data) and see what's going on with it Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.