e-Mail order details to admin?

scrut

No avatar

2007-08-02 20:48

When I enable the "send order to admin" function, all the admin gets is a line telling him that there was an order placed and that he should log into the backend to find out the details.

How can I send the entire order details (products, qty, address..) to the admin by email? That's a very important function for most simple shop solutions.

Thanks

s.

» Quick.Cart v2.x

wewior (OpenSolution)

Avatar: wewior

2007-08-03 14:19

you can install sendOrderToClient plugin, it is available in our download section and you can change client email address to yours
if you are using that plugin just copy and add line with mail function and change there email, then you and client will get and email

aquasyl

No avatar

2007-08-04 21:12

Hello Wewior,

You said :

if you are using that plugin just copy and add line with mail function and change there email, then you and client will get and email

Ok, but can you detail me to do that, on what files, and what line.

Maybe you can do this here?
This is my actions_client.php of send_ordertoclient
And i copy it?

Thank you

Aquasyl

This is the file :


<?php
if( $p == 'ordersDelivery' && isset( $_SESSION['iOrderSession_'.LANGUAGE] ) && is_numeric( $_SESSION['iOrderSession_'.LANGUAGE] ) ){

if( !function_exists( 'throwOrdersIdTemp' ) ){
require_once DIR_CORE.'orders-'.$config['db_type'].'.php';
require_once DIR_CORE.'orders.php';

require_once DIR_CORE.'couriers-'.$config['db_type'].'.php';
require_once DIR_CORE.'couriers.php';
}

if( isset( $_POST['sOption'] ) && $_POST['sOption'] == 'send' && checkOrderFields( $_POST ) ){
$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" );


}
}
?>

treewood (OpenSolution)

Avatar: treewood

2007-08-06 14:43

after this

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

put this:

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

Back to top
about us | contact