Jump to content

(SOLVED) How to change the title of the email which announces me that i have a new order?


Recommended Posts

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

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

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

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

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

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

  • 2 months later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...