source/Application/Model/Article.php
public function delete($sOXID = null)
    {
        if (!$sOXID) {
            $sOXID = $this->getId();
        }
        if (!$sOXID) {
            return false;
        }

        $database = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        $database->startTransaction();
        try {
            // #2339 delete first variants before deleting parent product
            $this->_deleteVariantRecords($sOXID);
            $this->load($sOXID);
            $this->_deletePics();
            $this->_onChangeResetCounts($sOXID, $this->oxarticles__oxvendorid->value, $this->oxarticles__oxmanufacturerid->value);

            // delete self
            $deleted = parent::delete($sOXID);

            $this->_deleteRecords($sOXID);

            Registry::get(\OxidEsales\Eshop\Application\Model\SeoEncoderArticle::class)->onDeleteArticle($this);

            $this->onChange(ACTION_DELETE, $sOXID, $this->oxarticles__oxparentid->value);

            $database->commitTransaction();
        } catch (Exception $exception) {
            $database->rollbackTransaction();

            throw $exception;
        }

        return $deleted;
    }
public function delete($sOXID = null)
    {
        if (!$sOXID) {
            $sOXID = $this->getId();
        }
        if (!$sOXID) {
            return false;
        }

        $database = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        $database->startTransaction();
        try {
            // #2339 delete first variants before deleting parent product
            $this->_deleteVariantRecords($sOXID);
            $this->load($sOXID);
            $this->_deletePics();
            $this->_onChangeResetCounts($sOXID, $this->oxarticles__oxvendorid->value, $this->oxarticles__oxmanufacturerid->value);

            // delete self
            $deleted = parent::delete($sOXID);

            $this->_deleteRecords($sOXID);

            Registry::get(\OxidEsales\Eshop\Application\Model\SeoEncoderArticle::class)->onDeleteArticle($this);

            $this->onChange(ACTION_DELETE, $sOXID, $this->oxarticles__oxparentid->value);

            $database->commitTransaction();
        } catch (Exception $exception) {
            $database->rollbackTransaction();

            throw $exception;
        }

        return $deleted;
    }
public function delete ( $ sOXID = null ) { if ( ! $ sOXID ) { $ sOXID = $ this -> getId ( ) ; } if ( ! $ sOXID ) { return false ; } $ database = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) ; $ database -> startTransaction ( ) ; try { // #2339 delete first variants before deleting parent product $ this -> _deleteVariantRecords ( $ sOXID ) ; $ this -> load ( $ sOXID ) ; $ this -> _deletePics ( ) ; $ this -> _onChangeResetCounts ( $ sOXID , $ this -> oxarticles__oxvendorid -> value , $ this -> oxarticles__oxmanufacturerid -> value ) ; // delete self $ deleted = parent :: delete ( $ sOXID ) ; $ this -> _deleteRecords ( $ sOXID ) ; Registry :: get ( \ OxidEsales \ Eshop \ Application \ Model \ SeoEncoderArticle :: class ) -> onDeleteArticle ( $ this ) ; $ this -> onChange ( ACTION_DELETE , $ sOXID , $ this -> oxarticles__oxparentid -> value ) ; $ database -> commitTransaction ( ) ; } catch ( Exception $ exception ) { $ database -> rollbackTransaction ( ) ; throw $ exception ; } return $ deleted ; }
Deletes record and other information related to this article such as images from DB,
also removes variants. Returns true if entry was deleted.

@param string $sOXID Article id

@throws \Exception

@return bool
Deletes record and other information related to this article such as images from DB also removes variants . Returns true if entry was deleted .