public function render_error($msg, $desc = false)
{
if ($this->request->is_ajax()) {
$this->iohandler->add_error_message($msg, $desc);
$this->iohandler->send_response(true);
} else {
$this->template->assign_vars(array('S_ERROR_BOX' => true, 'ERROR_TITLE' => $this->language->lang($msg)));
if ($desc) {
$this->template->assign_var('ERROR_MSG', $this->language->lang($desc));
}
}
}