protected function submitEditProduct()
    {
        if ($this->isPosted('delete')) {
            $this->deleteProduct();
        } else if ($this->isPosted('save') && $this->validateEditProduct()) {
            $this->deleteImagesProduct();
            if (isset($this->data_product['product_id'])) {
                $this->updateProduct();
            } else {
                $this->addProduct();
            }
        }
    }
protected function submitEditProduct()
    {
        if ($this->isPosted('delete')) {
            $this->deleteProduct();
        } else if ($this->isPosted('save') && $this->validateEditProduct()) {
            $this->deleteImagesProduct();
            if (isset($this->data_product['product_id'])) {
                $this->updateProduct();
            } else {
                $this->addProduct();
            }
        }
    }
protected function submitEditProduct ( ) { if ( $ this -> isPosted ( 'delete' ) ) { $ this -> deleteProduct ( ) ; } else if ( $ this -> isPosted ( 'save' ) && $ this -> validateEditProduct ( ) ) { $ this -> deleteImagesProduct ( ) ; if ( isset ( $ this -> data_product [ 'product_id' ] ) ) { $ this -> updateProduct ( ) ; } else { $ this -> addProduct ( ) ; } } }
Handles a submitted product
Handles a submitted product