public function cmdAddOrder()
    {
        $submitted = $this->getParam();

        $this->setSubmitted(null, $submitted);
        $this->setSubmittedJson('data');

        $this->validateComponent('order');

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

        $id = $this->order->add($this->getSubmitted());

        if (empty($id)) {
            $this->errorAndExit($this->text('Unexpected result'));
        }

        $this->line($id);
        $this->output();
    }
public function cmdAddOrder()
    {
        $submitted = $this->getParam();

        $this->setSubmitted(null, $submitted);
        $this->setSubmittedJson('data');

        $this->validateComponent('order');

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

        $id = $this->order->add($this->getSubmitted());

        if (empty($id)) {
            $this->errorAndExit($this->text('Unexpected result'));
        }

        $this->line($id);
        $this->output();
    }
public function cmdAddOrder ( ) { $ submitted = $ this -> getParam ( ) ; $ this -> setSubmitted ( null , $ submitted ) ; $ this -> setSubmittedJson ( 'data' ) ; $ this -> validateComponent ( 'order' ) ; if ( $ this -> isError ( ) ) { $ this -> output ( ) ; } $ id = $ this -> order -> add ( $ this -> getSubmitted ( ) ) ; if ( empty ( $ id ) ) { $ this -> errorAndExit ( $ this -> text ( 'Unexpected result' ) ) ; } $ this -> line ( $ id ) ; $ this -> output ( ) ; }
Callback for "order-add" command
Callback for order - add command