[ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 <?php 2 // Created on: <08-Aug-2006 15:23:10 bjorn> 3 // 4 // SOFTWARE NAME: eZ publish 5 // SOFTWARE RELEASE: 3.9.0 6 // BUILD VERSION: 17785 7 // COPYRIGHT NOTICE: Copyright (C) 1999-2006 eZ systems AS 8 // SOFTWARE LICENSE: GNU General Public License v2.0 9 // NOTICE: > 10 // This program is free software; you can redistribute it and/or 11 // modify it under the terms of version 2.0 of the GNU General 12 // Public License as published by the Free Software Foundation. 13 // 14 // This program is distributed in the hope that it will be useful, 15 // but WITHOUT ANY WARRANTY; without even the implied warranty of 16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 // GNU General Public License for more details. 18 // 19 // You should have received a copy of version 2.0 of the GNU General 20 // Public License along with this program; if not, write to the Free 21 // Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 22 // MA 02110-1301, USA. 23 // 24 25 /*! \file ezdefaultconfirmorderhandler.php 26 */ 27 28 /*! 29 \class eZDefaultConfirmOrderHandler ezdefaultconfirmorderhandler.php 30 \brief The class eZDefaultConfirmOrderHandler does 31 32 */ 33 34 class eZDefaultConfirmOrderHandler 35 { 36 /*! 37 Constructor 38 */ 39 function eZDefaultConfirmOrderHandler() 40 { 41 } 42 43 function execute( $params = array() ) 44 { 45 $ini =& eZINI::instance(); 46 $sendOrderEmail = $ini->variable( 'ShopSettings', 'SendOrderEmail' ); 47 if ( $sendOrderEmail == 'enabled' ) 48 { 49 $this->sendOrderEmail( $params ); 50 } 51 } 52 53 function sendOrderEmail( $params ) 54 { 55 $ini =& eZINI::instance(); 56 if ( isset( $params['order'] ) and 57 isset( $params['email'] ) ) 58 { 59 $order = $params['order']; 60 $email = $params['email']; 61 62 include_once ( "kernel/common/template.php" ); 63 $tpl =& templateInit(); 64 $tpl->setVariable( 'order', $order ); 65 $templateResult =& $tpl->fetch( 'design:shop/orderemail.tpl' ); 66 67 $subject = $tpl->variable( 'subject' ); 68 69 include_once ( 'lib/ezutils/classes/ezmail.php' ); 70 include_once ( 'lib/ezutils/classes/ezmailtransport.php' ); 71 $mail = new eZMail(); 72 73 $emailSender = $ini->variable( 'MailSettings', 'EmailSender' ); 74 if ( !$emailSender ) 75 $emailSender = $ini->variable( "MailSettings", "AdminEmail" ); 76 77 $mail->setReceiver( $email ); 78 $mail->setSender( $emailSender ); 79 $mail->setSubject( $subject ); 80 $mail->setBody( $templateResult ); 81 $mailResult = eZMailTransport::send( $mail ); 82 83 $email = $ini->variable( 'MailSettings', 'AdminEmail' ); 84 85 $mail = new eZMail(); 86 87 $mail->setReceiver( $email ); 88 $mail->setSender( $emailSender ); 89 $mail->setSubject( $subject ); 90 $mail->setBody( $templateResult ); 91 $mailResult = eZMailTransport::send( $mail ); 92 } 93 } 94 } 95 96 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sat Feb 24 10:30:04 2007 | par Balluche grâce à PHPXref 0.7 |