src/ShopBundle/objects/db/TShopOrder.class.php
public function SendOrderNotification($sSendToMail = null, $sSendToName = null)
    {
        $bOrderSend = false;

        if (is_null($sSendToMail)) {
            $sSendToMail = $this->fieldUserEmail;
        }
        if (is_null($sSendToName)) {
            $sSendToName = $this->fieldAdrBillingFirstname.' '.$this->fieldAdrBillingLastname;
        }

        $oMail = $this->GetOrderNotificationEmailProfile(self::MAIL_CONFIRM_ORDER);

        TCMSImage::ForceNonSSLURLs(true); // force image urls to non ssl for use in order email
        if (is_null($oMail)) {
            $bOrderSend = TGlobal::Translate('chameleon_system_shop.order_notification.error_mail_template_not_found', array('%emailTemplate%' => self::MAIL_CONFIRM_ORDER));
        } else {
            $aMailData = $this->sqlData;
            $aMailData = $this->AddOrderNotificationEmailData($aMailData);
            $aMailData = $this->AddOrderNotificationEmailComplexData($aMailData);
            $oMail->AddDataArray($aMailData);
            $aOrderDetails = $this->GetSQLWithTablePrefix();
            $oMail->AddDataArray($aOrderDetails);
            $oMail->ChangeToAddress($sSendToMail, $sSendToName);
            $bOrderSend = $oMail->SendUsingObjectView('emails', 'Customer');
            $this->SaveOrderNotificationDataToOrder($bOrderSend, $oMail, $sSendToMail);
        }
        TCMSImage::ForceNonSSLURLs(false); // reset - force non ssl urls

        return $bOrderSend;
    }
public function SendOrderNotification($sSendToMail = null, $sSendToName = null)
    {
        $bOrderSend = false;

        if (is_null($sSendToMail)) {
            $sSendToMail = $this->fieldUserEmail;
        }
        if (is_null($sSendToName)) {
            $sSendToName = $this->fieldAdrBillingFirstname.' '.$this->fieldAdrBillingLastname;
        }

        $oMail = $this->GetOrderNotificationEmailProfile(self::MAIL_CONFIRM_ORDER);

        TCMSImage::ForceNonSSLURLs(true); // force image urls to non ssl for use in order email
        if (is_null($oMail)) {
            $bOrderSend = TGlobal::Translate('chameleon_system_shop.order_notification.error_mail_template_not_found', array('%emailTemplate%' => self::MAIL_CONFIRM_ORDER));
        } else {
            $aMailData = $this->sqlData;
            $aMailData = $this->AddOrderNotificationEmailData($aMailData);
            $aMailData = $this->AddOrderNotificationEmailComplexData($aMailData);
            $oMail->AddDataArray($aMailData);
            $aOrderDetails = $this->GetSQLWithTablePrefix();
            $oMail->AddDataArray($aOrderDetails);
            $oMail->ChangeToAddress($sSendToMail, $sSendToName);
            $bOrderSend = $oMail->SendUsingObjectView('emails', 'Customer');
            $this->SaveOrderNotificationDataToOrder($bOrderSend, $oMail, $sSendToMail);
        }
        TCMSImage::ForceNonSSLURLs(false); // reset - force non ssl urls

        return $bOrderSend;
    }
public function SendOrderNotification ( $ sSendToMail = null , $ sSendToName = null ) { $ bOrderSend = false ; if ( is_null ( $ sSendToMail ) ) { $ sSendToMail = $ this -> fieldUserEmail ; } if ( is_null ( $ sSendToName ) ) { $ sSendToName = $ this -> fieldAdrBillingFirstname . ' ' . $ this -> fieldAdrBillingLastname ; } $ oMail = $ this -> GetOrderNotificationEmailProfile ( self :: MAIL_CONFIRM_ORDER ) ; TCMSImage :: ForceNonSSLURLs ( true ) ; // force image urls to non ssl for use in order email if ( is_null ( $ oMail ) ) { $ bOrderSend = TGlobal :: Translate ( 'chameleon_system_shop.order_notification.error_mail_template_not_found' , array ( '%emailTemplate%' => self :: MAIL_CONFIRM_ORDER ) ) ; } else { $ aMailData = $ this -> sqlData ; $ aMailData = $ this -> AddOrderNotificationEmailData ( $ aMailData ) ; $ aMailData = $ this -> AddOrderNotificationEmailComplexData ( $ aMailData ) ; $ oMail -> AddDataArray ( $ aMailData ) ; $ aOrderDetails = $ this -> GetSQLWithTablePrefix ( ) ; $ oMail -> AddDataArray ( $ aOrderDetails ) ; $ oMail -> ChangeToAddress ( $ sSendToMail , $ sSendToName ) ; $ bOrderSend = $ oMail -> SendUsingObjectView ( 'emails' , 'Customer' ) ; $ this -> SaveOrderNotificationDataToOrder ( $ bOrderSend , $ oMail , $ sSendToMail ) ; } TCMSImage :: ForceNonSSLURLs ( false ) ; // reset - force non ssl urls return $ bOrderSend ; }
send an order notification for this order.
send an order notification for this order .