ArsalanAnsari Posted April 28, 2015 Share Posted April 28, 2015 Hi, Is it possible to add functionality like for example when order status change to "Shipped" a mail forward to the customer with the attachment of delivery slip. if so please help me how can i add this functionality to my shop. thanks in advance. Link to comment Share on other sites More sharing options...
ArsalanAnsari Posted May 3, 2015 Author Share Posted May 3, 2015 Hi, Is it possible to add functionality like for example when order status change to "Shipped" a mail forward to the customer with the attachment of delivery slip. if so please help me how can i add this functionality to my shop. thanks in advance. any one! Link to comment Share on other sites More sharing options...
ArsalanAnsari Posted May 3, 2015 Author Share Posted May 3, 2015 (edited) any one! At last i found the solution. first to copy OrderHistory.php file in /override/classes/order then add following codes in function addWithemail at line 419. // Join PDF delivery slip if order status is "delivered" elseif((int)$result['id_order_state'] === 4 && (int)Configuration::get('PS_INVOICE') && $order->invoice_number) { $context = Context::getContext(); $pdf = new PDF($order->getDeliverySlipsCollection(), PDF::TEMPLATE_DELIVERY_SLIP, $context->smarty); $file_attachement['content'] = $pdf->render(false); $file_attachement['name'] = Configuration::get('PS_DELIVERY_PREFIX', (int)$order->id_lang, null, $order->id_shop).sprintf('%06d', $order->delivery_number).'.pdf'; $file_attachement['mime'] = 'application/pdf'; } else $file_attachement = null; and then in Order>Statuses enable "Send email to customer" for the status Shipped. thanks and enjoy. Edited May 3, 2015 by ArsalanAnsari (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts