source/Application/Model/Article.php
public function resetParent()
    {
        $sParentId = $this->oxarticles__oxparentid->value;
        $this->oxarticles__oxparentid = new \OxidEsales\Eshop\Core\Field('', \OxidEsales\Eshop\Core\Field::T_RAW);
        $this->_blAllowEmptyParentId = true;
        $this->save();
        $this->_blAllowEmptyParentId = false;

        if ($sParentId !== '') {
            $this->onChange(ACTION_UPDATE, null, $sParentId);
        }
    }
public function resetParent()
    {
        $sParentId = $this->oxarticles__oxparentid->value;
        $this->oxarticles__oxparentid = new \OxidEsales\Eshop\Core\Field('', \OxidEsales\Eshop\Core\Field::T_RAW);
        $this->_blAllowEmptyParentId = true;
        $this->save();
        $this->_blAllowEmptyParentId = false;

        if ($sParentId !== '') {
            $this->onChange(ACTION_UPDATE, null, $sParentId);
        }
    }
public function resetParent ( ) { $ sParentId = $ this -> oxarticles__oxparentid -> value ; $ this -> oxarticles__oxparentid = new \ OxidEsales \ Eshop \ Core \ Field ( '' , \ OxidEsales \ Eshop \ Core \ Field :: T_RAW ) ; $ this -> _blAllowEmptyParentId = true ; $ this -> save ( ) ; $ this -> _blAllowEmptyParentId = false ; if ( $ sParentId !== '' ) { $ this -> onChange ( ACTION_UPDATE , null , $ sParentId ) ; } }
Changes article variant to parent article
Changes article variant to parent article