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

        if (!$this->canDeleteAttribute($sOXID)) {
            return false;
        }

        // remove attributes from articles also
        $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        $sOxidQuoted = $oDb->quote($sOXID);
        $sDelete = "delete from oxobject2attribute where oxattrid = " . $sOxidQuoted;
        $oDb->execute($sDelete);

        // #657 ADDITIONAL removes attribute connection to category
        $sDelete = "delete from oxcategory2attribute where oxattrid = " . $sOxidQuoted;
        $oDb->execute($sDelete);

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

        if (!$this->canDeleteAttribute($sOXID)) {
            return false;
        }

        // remove attributes from articles also
        $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        $sOxidQuoted = $oDb->quote($sOXID);
        $sDelete = "delete from oxobject2attribute where oxattrid = " . $sOxidQuoted;
        $oDb->execute($sDelete);

        // #657 ADDITIONAL removes attribute connection to category
        $sDelete = "delete from oxcategory2attribute where oxattrid = " . $sOxidQuoted;
        $oDb->execute($sDelete);

        return parent::delete($sOXID);
    }
public function delete ( $ sOXID = null ) { if ( ! $ sOXID ) { $ sOXID = $ this -> getId ( ) ; } if ( ! $ this -> canDeleteAttribute ( $ sOXID ) ) { return false ; } // remove attributes from articles also $ oDb = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) ; $ sOxidQuoted = $ oDb -> quote ( $ sOXID ) ; $ sDelete = "delete from oxobject2attribute where oxattrid = " . $ sOxidQuoted ; $ oDb -> execute ( $ sDelete ) ; // #657 ADDITIONAL removes attribute connection to category $ sDelete = "delete from oxcategory2attribute where oxattrid = " . $ sOxidQuoted ; $ oDb -> execute ( $ sDelete ) ; return parent :: delete ( $ sOXID ) ; }
Removes attributes from articles, returns true on success.

@param string $sOXID Object ID

@return bool
Removes attributes from articles returns true on success .