SOLVED Multiple Order Notification Mails to Admin

  • Posts: 24
  • Thank you received: 1
12 years 2 months ago #65207

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

Last edit: 12 years 1 month ago by nik.mess.

Please Log in or Create an account to join the conversation.

  • Posts: 82818
  • Thank you received: 13362
  • MODERATOR
12 years 2 months ago #65349

Please Log in or Create an account to join the conversation.

  • Posts: 24
  • Thank you received: 1
12 years 1 month ago #66325

Thank you for the hint!

I also managed to create a PDF summery of the order with FPDF:

<?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: 12 years 1 month ago by nik.mess.

Please Log in or Create an account to join the conversation.

Time to create page: 0.052 seconds
Powered by Kunena Forum