- Posts: 24
- Thank you received: 1
SOLVED Multiple Order Notification Mails to Admin
14 years 3 weeks ago - 14 years 2 weeks ago #65207
by nik.mess
SOLVED Multiple Order Notification Mails to Admin was created by nik.mess
Is it possible to send the Order administrator notification to two different email addresses (to our HQ and the local distributor)? Different content would be nice but is not absolutely needed.
Also, is it possible that changing the email templates on the demo site (demo.hikashop.com) is not possible? It says "sucessfully saved", even though all changes disappear.
Thanks for any help!
nik
Also, is it possible that changing the email templates on the demo site (demo.hikashop.com) is not possible? It says "sucessfully saved", even though all changes disappear.
Thanks for any help!
nik
Last edit: 14 years 2 weeks ago by nik.mess.
Please Log in or Create an account to join the conversation.
14 years 3 weeks ago #65349
by nicolas
Replied by nicolas on topic Re: Send Multiple Order Notification Mails to Admin
You can do like that:
www.hikashop.com/en/forum/4-how-to/15558...fiation-e-mails.html
www.hikashop.com/en/forum/4-how-to/15558...fiation-e-mails.html
Please Log in or Create an account to join the conversation.
14 years 2 weeks ago - 14 years 2 weeks ago #66325
by nik.mess
Replied by nik.mess on topic Re: Send Multiple Order Notification Mails to Admin
Thank you for the hint!
I also managed to create a PDF summery of the order with FPDF:
I also managed to create a PDF summery of the order with FPDF:
Code:
<?php
//PDF Attachment
$pdfoc = new OCPDF();
$pdfoc->SetCustomerOrderNo($data->customer_order_no);
$pdfoc->SetCustomerNo($data->customer->name);
$template = trim(hikashop_getLayout($view,'address_template',$params,$js));
if(!empty($data->cart->billing_address)){
$billing = $template;
foreach($data->order_addresses_fields as $field){
$fieldname = $field->field_namekey;
$address =& $data->order_addresses[$data->cart->billing_address->address_id];
$billing=str_replace('{'.$fieldname.'}',$fieldsClass->show($field,$address->$fieldname),$billing);
}
$billing = str_replace(array("\r\n","\r","\n"),"\n",preg_replace('#{(?:(?!}).)*}#i','',$billing));
$pdfoc->SetCustomerBillingAddress($billing);
}
$ordercurrency = $currencyHelper->getCurrencies($data->order_currency_id,$null)[1]->currency_symbol;
$pdfoc->SetOrderCurrency($ordercurrency);
$pdfoc->AddPage();
foreach($data->cart->products as $item){
$pdfoc->AppendProduct(strip_tags($item->order_product_name),$item->order_product_code,$item->order_product_price,$item->order_product_quantity);
}
if(bccomp($data->order_shipping_price,0,5)){
$pdfoc->AppendShipping($data->order_shipping_price);
}
$pdfoc->PrintTotal($data->cart->full_total->prices[0]->price_value_with_tax);
$pdfoc->AliasNbPages();
$pdfoc->Output("/Applications/MAMP/htdocs/pdfoc/Summary-".$data->order_number.'.pdf',"F");
$attachObj = null;
$attachObj->name = 'MetaSystems-Summary-'.$data->order_number.'.pdf';
$attachObj->filename = "/Applications/MAMP/htdocs/pdfoc/Summary-".$data->order_number.'.pdf';
$attachObj->url = 'localhost:8888';
$mail->attachments = array($attachObj);
?>
Last edit: 14 years 2 weeks ago by nik.mess.
Please Log in or Create an account to join the conversation.
Time to create page: 0.184 seconds