source/Application/Model/Order.php
protected function _sendOrderByEmail($oUser = null, $oBasket = null, $oPayment = null)
    {
        $iRet = self::ORDER_STATE_MAILINGERROR;

        // add user, basket and payment to order
        $this->_oUser = $oUser;
        $this->_oBasket = $oBasket;
        $this->_oPayment = $oPayment;

        $oxEmail = oxNew(\OxidEsales\Eshop\Core\Email::class);

        // send order email to user
        if ($oxEmail->sendOrderEMailToUser($this)) {
            // mail to user was successfully sent
            $iRet = self::ORDER_STATE_OK;
        }

        // send order email to shop owner
        $oxEmail->sendOrderEMailToOwner($this);

        return $iRet;
    }
protected function _sendOrderByEmail($oUser = null, $oBasket = null, $oPayment = null)
    {
        $iRet = self::ORDER_STATE_MAILINGERROR;

        // add user, basket and payment to order
        $this->_oUser = $oUser;
        $this->_oBasket = $oBasket;
        $this->_oPayment = $oPayment;

        $oxEmail = oxNew(\OxidEsales\Eshop\Core\Email::class);

        // send order email to user
        if ($oxEmail->sendOrderEMailToUser($this)) {
            // mail to user was successfully sent
            $iRet = self::ORDER_STATE_OK;
        }

        // send order email to shop owner
        $oxEmail->sendOrderEMailToOwner($this);

        return $iRet;
    }
protected function _sendOrderByEmail ( $ oUser = null , $ oBasket = null , $ oPayment = null ) { $ iRet = self :: ORDER_STATE_MAILINGERROR ; // add user, basket and payment to order $ this -> _oUser = $ oUser ; $ this -> _oBasket = $ oBasket ; $ this -> _oPayment = $ oPayment ; $ oxEmail = oxNew ( \ OxidEsales \ Eshop \ Core \ Email :: class ) ; // send order email to user if ( $ oxEmail -> sendOrderEMailToUser ( $ this ) ) { // mail to user was successfully sent $ iRet = self :: ORDER_STATE_OK ; } // send order email to shop owner $ oxEmail -> sendOrderEMailToOwner ( $ this ) ; return $ iRet ; }
Send order to shop owner and user

@param \OxidEsales\Eshop\Application\Model\User        $oUser    order user
@param \OxidEsales\Eshop\Application\Model\Basket      $oBasket  current order basket
@param \OxidEsales\Eshop\Application\Model\UserPayment $oPayment order payment

@return bool
Send order to shop owner and user