public function cmdUpdateOrder()
    {
        $params = $this->getParam();

        if (empty($params[0]) || count($params) < 2) {
            $this->errorAndExit($this->text('Invalid command'));
        }

        if (!is_numeric($params[0])) {
            $this->errorAndExit($this->text('Invalid argument'));
        }

        $this->setSubmitted(null, $params);
        $this->setSubmitted('update', $params[0]);
        $this->setSubmittedJson('data');

        $this->validateComponent('order');

        if ($this->isError()) {
            $this->output();
        }

        if (!$this->order->update($params[0], $this->getSubmitted())) {
            $this->errorAndExit($this->text('Unexpected result'));
        }

        $this->output();
    }