webbusiness23 Posted April 2, 2010 Share Posted April 2, 2010 Hi,i want to change the title of the email which announces me that i have a new order.The title can be found inside the language folder, in my case inside the modules/mailalerts/mails/ro folder. There is a file called new_order.html.I edited the title of this html file into something like this: <title>[{shop_name}] New order [{total_products}]: [{firstname}] [{lastname}]</title> , but no result.The email title remains the same.I want to make this change because i want to differentiate the emails, using the client's full name and the total products amount.Can you help me with this? Link to comment Share on other sites More sharing options...
outlet.ee Posted April 2, 2010 Share Posted April 2, 2010 You need to go to /modules/mailalerts/ro.php and find the current title of the email and change it to whatever you want. Link to comment Share on other sites More sharing options...
webbusiness23 Posted April 3, 2010 Author Share Posted April 3, 2010 You need to go to /modules/mailalerts/ro.php and find the current title of the email and change it to whatever you want. This is all i got inside the /modules/mailalerts/ro.php file:<?php global $_MODULE; $_MODULE = array(); Any other suggestions?As i posted above, i tried to change the html title like the above code , but no result. Link to comment Share on other sites More sharing options...
outlet.ee Posted April 3, 2010 Share Posted April 3, 2010 All right, I explained it a bit wrong. Go to /modules/mailalerts/, there is a php-file for each language. Copy the contents of the file containing the most lines (i.e translations) to the ro.php and change it into your language. Link to comment Share on other sites More sharing options...
webbusiness23 Posted April 3, 2010 Author Share Posted April 3, 2010 There is no file for each language. All i have is ro.php. I don't know why i don't have the other files too. Do you? Link to comment Share on other sites More sharing options...
webbusiness23 Posted April 3, 2010 Author Share Posted April 3, 2010 There is no file for each language. All i have is ro.php. I don't know why i don't have the other files too. Do you? I think i know why: i deleted the other languages (en and fr) from Back Office.Is there a solution for my problem? Link to comment Share on other sites More sharing options...
outlet.ee Posted April 3, 2010 Share Posted April 3, 2010 Here are the contents of my file: <?php global $_MODULE; $_MODULE = array(); $_MODULE['<{mailalerts}prestashop>mailalerts_fd30254803e8db32521d3390131a44da'] = 'Mailalerts'; $_MODULE['<{mailalerts}prestashop>mailalerts_7cb9a154f101c674c945f88dad5c5e28'] = 'No messages'; $_MODULE['<{mailalerts}prestashop>mailalerts_9137796c15dd92e5553c3f29574d0968'] = 'Coupon code:'; $_MODULE['<{mailalerts}prestashop>mailalerts_4c9120f1a5947445c0e9620254ceb30b'] = 'New order'; $_MODULE['<{mailalerts}prestashop>mailalerts_644f9c907ef5a8315916bd1e2f61f783'] = 'Out of stock'; $_MODULE['<{mailalerts}prestashop>mailalerts_c888438d14855d7d96a2724ee9c306bd'] = 'Settings updated'; I am not sure whether this long numbers apply to all the prestashops the same way but you could try. Link to comment Share on other sites More sharing options...
webbusiness23 Posted April 3, 2010 Author Share Posted April 3, 2010 Here are the contents of my file:<?php global $_MODULE; $_MODULE = array(); $_MODULE['<{mailalerts}prestashop>mailalerts_fd30254803e8db32521d3390131a44da'] = 'Mailalerts'; $_MODULE['<{mailalerts}prestashop>mailalerts_7cb9a154f101c674c945f88dad5c5e28'] = 'No messages'; $_MODULE['<{mailalerts}prestashop>mailalerts_9137796c15dd92e5553c3f29574d0968'] = 'Coupon code:'; $_MODULE['<{mailalerts}prestashop>mailalerts_4c9120f1a5947445c0e9620254ceb30b'] = 'New order'; $_MODULE['<{mailalerts}prestashop>mailalerts_644f9c907ef5a8315916bd1e2f61f783'] = 'Out of stock'; $_MODULE['<{mailalerts}prestashop>mailalerts_c888438d14855d7d96a2724ee9c306bd'] = 'Settings updated'; I am not sure whether this long numbers apply to all the prestashops the same way but you could try. As i said above, i deleted both the en and fr languages.I don't think your piece of code will do me any good.Is there any moderator that might suggest me some solution?Thank you in advance! Link to comment Share on other sites More sharing options...
rocky Posted April 4, 2010 Share Posted April 4, 2010 Change line 131 of modules/mailalerts/mailalerts.php from: $subject = $this->l('New order'); to: $subject = $this->l('New order') . ' [' . Tools::displayPrice($order->getTotalProductsWithTaxes(), $currency) . ']: [' . $customer->firstname . '] [' . $customer->lastname . ']'; Link to comment Share on other sites More sharing options...
webbusiness23 Posted April 4, 2010 Author Share Posted April 4, 2010 Change line 131 of modules/mailalerts/mailalerts.php from: $subject = $this->l('New order'); to: $subject = $this->l('New order') . ' [' . Tools::displayPrice($order->getTotalProductsWithTaxes(), $currency) . ']: [' . $customer->firstname . '] [' . $customer->lastname . ']'; Thank you very much!It worked perfectly! Link to comment Share on other sites More sharing options...
yeus2001 Posted June 28, 2010 Share Posted June 28, 2010 This was very helpfull ,but i also need to show in title the order number.Any help with that will be appreciated. Link to comment Share on other sites More sharing options...
rocky Posted June 28, 2010 Share Posted June 28, 2010 You can add the following code to display the order number: $order->id 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