Email

paul ec1

No avatar

2008-07-27 17:55

Hi all,
Just playing with some .tpl's and i wanted to find out, at what point in the actions_client/orders.php code does it send the confirmation email
ie what is the trigger?

The resone is that i wish to remove this trigger from one tpl and add it to another.

Many regards
Paul

» Quick.Cart v2.x

Makaron

Avatar: Makaron

2008-07-28 08:54

Email is sending in function saveOrder(). You can find whole instruction in core/orders.php try search for this condition:

if( $GLOBALS['config']['mail_informing'] === true )

paul ec1

No avatar

2008-07-29 01:43

Hi i had a look at what you informed me to look at and i hav e found the the trigger/ funtion was in actions_client.php, i have copied the code into my actions_client/orders.php code, but i can't get it to work!!


Can you see the problem, any help is very much Appreciated.





$aData = throwOrder( $iOrder );
if( isset( $aData ) && is_array( $aData ) ){

$iStatus = "5";

// start of email inserted code
$iOrder = $_SESSION['iOrderSession_'.LANGUAGE];
$sTo = $_POST['sEmail'];
$sTemplate = $config['language'].'_sendOrderToClient.tpl';
$sTitle = $tpl->tbHtml( $sTemplate, 'EMAIL_TITLE' );

$sEmailContent = listBasket( $iOrder, $sTemplate );

if( !empty( $_POST['iCourier'] ) && !empty( $sEmailContent ) ){
$sEmailContent = $tpl->tbHtml( $sTemplate, 'EMAIL_HEAD' ).$sEmailContent;
$aCourier = explode( '|', $_POST['iCourier'] );
$aCourier = throwCourier( $aCourier[0] );
if( function_exists( 'changeCourierPaymentPrice' ) )
changeCourierPaymentPrice( $aCourier, $iOrder );
$fSummary = tPrice( $aCourier['fPrice'] + $aList['fSummary'] );
$sSummary = changePriceFormat( $fSummary );
$sEmailContent .= $tpl->tbHtml( $sTemplate, 'EMAIL_FOOT' );
}

@mail( $sTo, $sTitle, ereg_replace( '\|n\|', "\n", $sEmailContent ), 'FROM: '.$config['email']."\r\nContent-Type: text/plain; charset=".$config['charset']."\r\n" );

// end of email insert

saveOrderStatus( $iOrder, $iStatus );


require DIR_CONFIG.'lang_'.$aData['sLang'].'.php';
$sBasketList = listBasket( $iOrder, 'orders_details.tpl' );
if( !empty( $sBasketList ) ){
$aData['fSummary'] = tPrice( $aData['fCourierPrice'] + $aList['fSummary'] );
$aData['sSummary'] = changePriceFormat( $aData['fSummary'] );
$sBasketList .= $tpl->tbHtml( 'orders_details.tpl', 'COURIER' );

Back to top
about us | contact