mhu100 Posted January 9, 2009 Share Posted January 9, 2009 How can I put the order ID in the mail-subject (Order Confirmation) ?This will make it easy to track the order in mailprogram for customer and for Admin.is there a way to do this?Thanks in advance Link to comment Share on other sites More sharing options...
TropischBruin Posted January 9, 2009 Share Posted January 9, 2009 Good question, I've looked for this but the e-mail subject is not configurable yet I'll guess. Link to comment Share on other sites More sharing options...
mhu100 Posted January 9, 2009 Author Share Posted January 9, 2009 I have tried to manage this in file PaymentModule.php ... if ($orderStatus->send_email AND Validate::isEmail($customer->email)) Mail::Send(intval($order->id_lang), 'order_conf', 'Order Confirmation', $data, $customer->email, $customer->firstname.' '.$customer->lastname, NULL, NULL, $fileAttachment); but I don't get it to work. TropischBruin, maybe you can help me out with that? Link to comment Share on other sites More sharing options...
TropischBruin Posted January 9, 2009 Share Posted January 9, 2009 TropischBruin, maybe you can help me out with that? I'm sorry, I'm no php-coder :cheese: Link to comment Share on other sites More sharing options...
joachim Posted January 10, 2009 Share Posted January 10, 2009 Mail::Send(intval($order->id_lang), 'order_conf', 'Order confirmation '. $order->id, $data, ...Hope it helps. Link to comment Share on other sites More sharing options...
mhu100 Posted January 10, 2009 Author Share Posted January 10, 2009 Thanks, but that isn't working. I get a message "Mailsettings not correct". Mail isn't send at all. Link to comment Share on other sites More sharing options...
joachim Posted January 10, 2009 Share Posted January 10, 2009 Strange, worked fine for me. Link to comment Share on other sites More sharing options...
mhu100 Posted January 10, 2009 Author Share Posted January 10, 2009 Maybe you can post the file PaymentModule.php for Presta 1.1 here for download? Link to comment Share on other sites More sharing options...
mhu100 Posted January 10, 2009 Author Share Posted January 10, 2009 Never mind...I forgot a dot in the code. Now its working just fine. THANKS! Link to comment Share on other sites More sharing options...
mhu100 Posted January 10, 2009 Author Share Posted January 10, 2009 The next question is, where do I put this code so the admin-confirmationmail contains the order ID also? Link to comment Share on other sites More sharing options...
TropischBruin Posted January 10, 2009 Share Posted January 10, 2009 The next question is, where do I put this code so the admin-confirmationmail contains the order ID also? You mean the extra e-mail send to the admin? Link to comment Share on other sites More sharing options...
mhu100 Posted January 10, 2009 Author Share Posted January 10, 2009 yes, that is what I mean Link to comment Share on other sites More sharing options...
TropischBruin Posted January 10, 2009 Share Posted January 10, 2009 check modules\mailalerts. Link to comment Share on other sites More sharing options...
mhu100 Posted January 10, 2009 Author Share Posted January 10, 2009 There is nothing to configure. Link to comment Share on other sites More sharing options...
TropischBruin Posted January 10, 2009 Share Posted January 10, 2009 not in you back-end but the server folders. There you find the e-mails to adjust. Link to comment Share on other sites More sharing options...
mhu100 Posted January 10, 2009 Author Share Posted January 10, 2009 OK, I will check that out. Link to comment Share on other sites More sharing options...
kyrre Posted February 12, 2009 Share Posted February 12, 2009 Greetings allI think it's time to clarify the issue here. The emails sent to customers are altered in two places:1) CONTENT: /mails/your_language_folder/2) SUBJECT: /mails/your_language_folder/lang.phpIf /your_language_folder/ (eg: fr/ de/ no/ se/) is missing copy and rename the /en/ folder and translate the html and txt files to your language.PUTTING ORDER ID IN SUBJECT FIELDThis I have tried to solve without luck. I found this post explaining how to, but it's not working. The order ID does not appear in the customers email subject field. Maybe there must be a {tag} in /mails/your_language_folder/lang.php? Link to comment Share on other sites More sharing options...
mhu100 Posted February 12, 2009 Author Share Posted February 12, 2009 PUTTING ORDER ID IN SUBJECT FIELD This issue was allready solved by user joachim. Posted: 10 January 2009 12:57 PM Page 1 Link to comment Share on other sites More sharing options...
kyrre Posted February 12, 2009 Share Posted February 12, 2009 PUTTING ORDER ID IN SUBJECT FIELD This issue was allready solved by user joachim. Posted: 10 January 2009 12:57 PM Page 1 If you read my post one more time: It's not working!I have edited the file, I get no errors, the order ID does NOT appear in the Subject field. Link to comment Share on other sites More sharing options...
mhu100 Posted February 12, 2009 Author Share Posted February 12, 2009 for me it works just fine. That's why I said it was solved. Link to comment Share on other sites More sharing options...
kyrre Posted February 12, 2009 Share Posted February 12, 2009 for me it works just fine. That's why I said it was solved. What exactly did you do? Just the small adjustment from Joachim's solution? Link to comment Share on other sites More sharing options...
mhu100 Posted February 12, 2009 Author Share Posted February 12, 2009 Yes, this is the line of code I use. Mail::Send(intval($order->id_lang), 'order_conf','Order '.$order->id, $data, $customer->email, $customer->firstname.' '.$customer->lastname, NULL, NULL, $fileAttachment); Link to comment Share on other sites More sharing options...
kyrre Posted February 12, 2009 Share Posted February 12, 2009 Well... still don't work for me.This is my subject line now:[Pushvideo] OrdrebekreftelseI want it to be like this:[Pushvideo] Ordrebekreftelse - ordrenummer 000016How do I get the "000016" from the order? Link to comment Share on other sites More sharing options...
mhu100 Posted February 12, 2009 Author Share Posted February 12, 2009 Quote the code you use. I will take a look at it. Link to comment Share on other sites More sharing options...
vzero Posted November 2, 2009 Share Posted November 2, 2009 Hi All,to follow up on this To get the subject to change to something useful in the mail alerts moduleI went to module>mailalerts>mailalerts.phpand changed line131 to $subject = $this->l('Order: ' .$order->id.' From: '.$customer->email); So now the subject of new orders is Order: 33 From: [email protected]This saves us a ton of timeThanksnathan Link to comment Share on other sites More sharing options...
Jeff S. Posted April 28, 2010 Share Posted April 28, 2010 Hello,I tried to use the: Mail::Send(intval($order->id_lang), ‘order_conf’, ‘Order confirmation ‘. $order->id, $data, ….It indeed works...IN ENGLISH. For the other languages of the shop it just uses the english "Order Confirmation" but not the associated translation.SO in plain english:1- Without the . $order->id I get the proper translation in the subject in foreign languages2- With the . $order->id I get the order ID but lose the associated foreign language (it uses the english)Any idea on how to solve this? I am not sure how the code is parsing the lang.php but it reverts to english for foreign language.Order ID in subject seems pretty standard so would appreciate any help.CheersJeff Link to comment Share on other sites More sharing options...
Recommended Posts