protected function addReview()
    {
        $submitted = $this->getSubmitted();
        $added = $this->review->add($submitted);

        if (empty($added)) {
            $message = $this->text('Review has not been added');
            $this->redirect('', $message, 'warning');
        }

        $message = $this->text('Review has been added');

        if (empty($submitted['status'])) {
            $message = $this->text('Review has been added and will be published after approval');
        }

        $this->redirect("product/{$this->data_product['product_id']}", $message, 'success');
    }
protected function addReview()
    {
        $submitted = $this->getSubmitted();
        $added = $this->review->add($submitted);

        if (empty($added)) {
            $message = $this->text('Review has not been added');
            $this->redirect('', $message, 'warning');
        }

        $message = $this->text('Review has been added');

        if (empty($submitted['status'])) {
            $message = $this->text('Review has been added and will be published after approval');
        }

        $this->redirect("product/{$this->data_product['product_id']}", $message, 'success');
    }
protected function addReview ( ) { $ submitted = $ this -> getSubmitted ( ) ; $ added = $ this -> review -> add ( $ submitted ) ; if ( empty ( $ added ) ) { $ message = $ this -> text ( 'Review has not been added' ) ; $ this -> redirect ( '' , $ message , 'warning' ) ; } $ message = $ this -> text ( 'Review has been added' ) ; if ( empty ( $ submitted [ 'status' ] ) ) { $ message = $ this -> text ( 'Review has been added and will be published after approval' ) ; } $ this -> redirect ( "product/{$this->data_product['product_id']}" , $ message , 'success' ) ; }
Adds a submitted review
Adds a submitted review