Jump to content

[SOLVED] Cart ID in new order email


Recommended Posts

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

  • 2 weeks later...

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

  • 4 weeks later...

Thanks for the tips.

How to add ordernumber to the subject in "new order email" like:

[shop_name] New order - 000087

Even better if the name was there to like:

[shop_name] New order - 000087 - John Smith

That would make it much easier to find the right order in the inbox...

TIA!

/Thomas

Link to comment
Share on other sites

  • 1 month later...

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

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

  • 5 months later...

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

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

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...