121man Posted October 7, 2010 Share Posted October 7, 2010 Hi Guys,How can i get the cart Id to show up on the new order emails recieved which have the delivery address etc... ?Thanks Link to comment Share on other sites More sharing options...
rocky Posted October 7, 2010 Share Posted October 7, 2010 Change line 171 of modules/mailalerts/mailalerts.php (in PrestaShop v1.3.2) from: '{message}' => $message to: '{message}' => $message, '{id_cart}' => $order->id_cart then you can add {id_cart} to the new_order.html and new_order.txt email templates where you want the cart ID displayed. Link to comment Share on other sites More sharing options...
121man Posted October 7, 2010 Author Share Posted October 7, 2010 Thanks a bunch, that done the job just as i wanted.Really appreciate it.Thanks alot you've been a great help Link to comment Share on other sites More sharing options...
rocky Posted October 7, 2010 Share Posted October 7, 2010 Please edit your first post and add [sOLVED] to the front of the title. Link to comment Share on other sites More sharing options...
121man Posted October 7, 2010 Author Share Posted October 7, 2010 Thanks a bunch! Link to comment Share on other sites More sharing options...
Stefand Posted October 19, 2010 Share Posted October 19, 2010 how can I show the total weight of the order in the new_order mail ? Link to comment Share on other sites More sharing options...
rocky Posted October 20, 2010 Share Posted October 20, 2010 Add the following to the $templateVars in the file mentioned above: '{total_weight}' => $params['cart']->getTotalWeight(), Then you can use {total_weight} in new_order.html and new_order.txt. Link to comment Share on other sites More sharing options...
Stefand Posted October 20, 2010 Share Posted October 20, 2010 Rocky,Thank you so much!How can I add some address details in the subject from the mail: new_order.html ?Like the: zip code and housenumber... Link to comment Share on other sites More sharing options...
rocky Posted October 21, 2010 Share Posted October 21, 2010 Change line 135 of modules/mailalerts/mailalerts.php from (in PrestaShop v1.3.2) from: $subject = $this->l('New order'); to: $subject = $this->l('New order - ' . $delivery->address1 . ', ' . $delivery->postcode); This will add the first delivery address line and postcode to the subject line. You can change $delivery to $invoice if you would rather use the invoice address. Link to comment Share on other sites More sharing options...
lunken Posted November 16, 2010 Share Posted November 16, 2010 Thanks for the tips.How to add ordernumber to the subject in "new order email" like:[shop_name] New order - 000087Even better if the name was there to like:[shop_name] New order - 000087 - John SmithThat would make it much easier to find the right order in the inbox...TIA!/Thomas Link to comment Share on other sites More sharing options...
rocky Posted November 16, 2010 Share Posted November 16, 2010 Change the line mentioned above to: $subject = $this->l('New order - ' . sprintf("d", $order->id) . ' - ' . $customer->firstname . ' ' . $customer->lastname); Link to comment Share on other sites More sharing options...
lunken Posted November 16, 2010 Share Posted November 16, 2010 Thanks but...Instead of ordernumber it showed up a "d", the name came out fine..[verktygssats.se] New order - d - Thomas Lundqvist/Thomas Link to comment Share on other sites More sharing options...
rocky Posted November 16, 2010 Share Posted November 16, 2010 The forums keep deleting part of my code. :roll: You should be using % 0 6 d without spaces in the first sprintf parameter. Link to comment Share on other sites More sharing options...
lunken Posted November 16, 2010 Share Posted November 16, 2010 Thanks a lot Rocky!People like you are great! /Thomas Link to comment Share on other sites More sharing options...
lunken Posted January 10, 2011 Share Posted January 10, 2011 Hi!How do I add the phonenumber to the orderemail?Thanks in advance!/Thomas Link to comment Share on other sites More sharing options...
rocky Posted January 10, 2011 Share Posted January 10, 2011 I don't understand. The order confirmation and new order emails already have the phone numbers on them, at least on my PrestaShop v1.3.5 website. Link to comment Share on other sites More sharing options...
lunken Posted January 10, 2011 Share Posted January 10, 2011 Hey Rocky, you are right, its in the template.But it not inserted in the mail for some reason Any thoughts?{delivery_company} {delivery_firstname} {delivery_lastname} {delivery_address1} {delivery_address2} {delivery_city} {delivery_postal_code} {delivery_country} {delivery_state} {delivery_phone} {delivery_other} Link to comment Share on other sites More sharing options...
lunken Posted January 11, 2011 Share Posted January 11, 2011 What line to check in mailalerts.php so I can see so its there?The phonenumber shows up in admin under Orders and Customers and so on, it also shows up in pdf-invoices so I know its in the database.RegardsThomas Link to comment Share on other sites More sharing options...
rocky Posted January 11, 2011 Share Posted January 11, 2011 I can't see why it wouldn't work. It is lines 99 and 100 of modules/mailalerts/mailalerts.php that gets the delivery and invoice addresses from the order: $delivery = new Address(intval($order->id_address_delivery)); $invoice = new Address(intval($order->id_address_invoice)); and line 174 and 185 that puts the phone numbers into variables: '{delivery_phone}' => $delivery->phone, '{invoice_phone}' => $invoice->phone, Link to comment Share on other sites More sharing options...
motoworlddesign Posted January 11, 2011 Share Posted January 11, 2011 Thank you !!Excellent !! Link to comment Share on other sites More sharing options...
fallenleader Posted June 25, 2011 Share Posted June 25, 2011 Hate to resurrect this topic but i believe the [ ] around the shop name in the contact us emails and new order emails are making thunderbird filter the emails as junk.i'd like to remove the [ ] if possible. but don't know what files to attack.if anyone could help, thank you. Link to comment Share on other sites More sharing options...
rocky Posted June 25, 2011 Share Posted June 25, 2011 You should override classes/Mail.php to change line 144 (in PrestaShop v1.4.2) from: $message = new Swift_Message('['.Configuration::get('PS_SHOP_NAME').'] '. $subject); to: $message = new Swift_Message(Configuration::get('PS_SHOP_NAME').': '.$subject); This will change the [] to a : after the shop name. Link to comment Share on other sites More sharing options...
fallenleader Posted June 25, 2011 Share Posted June 25, 2011 still hitting the spam filter but i know where to go to work on it now, thank you very much. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now