Enable pdf and email sending in Order/save
This commit is contained in:
@@ -33,7 +33,7 @@ class Emailnotification {
|
||||
];
|
||||
|
||||
$attachment["isfile"] = false;
|
||||
if($filename) {
|
||||
if($file) {
|
||||
$attachment['isfile'] = true;
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ class Emailnotification {
|
||||
$mime = new Mail_mime();
|
||||
$mime->setTXTBody($this->body);
|
||||
|
||||
var_dump($att);exit;
|
||||
//var_dump($this->attachments);exit;
|
||||
|
||||
if(count($this->attachments)) {
|
||||
foreach($this->attachments as $att) {
|
||||
|
||||
@@ -381,11 +381,13 @@ class OrderController extends mfBaseController {
|
||||
if($spin && !AddressModel::search(['spin' => $spin])) {
|
||||
$owner->spin = $spin;
|
||||
if($owner->save()) {
|
||||
/*
|
||||
|
||||
// render service pin PDF
|
||||
$pdf = new Layout();
|
||||
$pdf->setTemplate("Emailtemplates/attachments/new_order.pdf");
|
||||
$pdf->set("ressourcePathPrefix", BASEDIR."/public/");
|
||||
$pdf->set("owner", $owner);
|
||||
$pdf->set("order", $order);
|
||||
|
||||
$pdfpath = $pdf->renderPDF();
|
||||
$tvalue = $pdf->getReturnedValue();
|
||||
@@ -421,7 +423,7 @@ class OrderController extends mfBaseController {
|
||||
$email->addAttachment($pdfpath, null, $pdfname, "application/pdf");
|
||||
$email->send();
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user