michal.siman 2007-03-29 23:09
I am building a plugin for send order status on change to client. But a have a trouble with readin field with client email, status and more. My plugin (it is just a temporary for test!):
if( $p == 'ordersMore' && $sOption == 'save' && isset( $iOrder ) ){ $sTemplate = $config [ 'language' ]. '_sendStatusOnChangeToClient.tpl' ; $sTitle = $tpl -> tbHtml ( $sTemplate , 'EMAIL_TITLE' ); $sEmailContent = $tpl -> tbHtml ( $sTemplate , 'EMAIL_HEAD' ); $header = "From: \" zAnglie . cz \ " <" . $config [ 'email' ]. ">\n" ; $header .= "MIME-version: 1.0\n" ; $header .= "X-Mailer: PHP\n" ; $header .= "Return-Path: " . $config [ 'email' ]. "\n" ; $header .= "Reply-To: " . $config [ 'email' ]. "\n" ; $header .= "Content-Type: text/plain; charset=\" windows - 1250 \ "\n" ; @ mail ( $clientemail , $sTitle , ereg_replace ( '\|n\|' , "\n" , $sEmailContent ), $header );
and template files is:
<!-- BEGIN EMAIL_TITLE --> Order $iOrder <!-- END EMAIL_TITLE --> <!-- BEGIN EMAIL_HEAD --> Status of your order was change to : $aData [ sStatus ] Thank you <!-- END EMAIL_HEAD -->
Plugin now working, but without show plugin status and send email to me, not to client. $aData[sStatus] inside template files not working and i dont know how i can call client email. Thanks for show right way ...
» Quick.Cart v2.x michal.siman 2007-03-30 10:39
any idea treewood? please
2007-04-02 10:03
michal.siman - we have this as payment plugin and sorry but we cant give You that code for free. This is in our plugin: ordersPack