Jump to content

{carrier} and {date} in Shipped email not working


grega33

Recommended Posts

I would like to use {date} (date of order placement) and {carrier} also in "shipped" e-mail template. If I simply use {carrier} and {date} as in a "order_conf" email it does not work - string "{carrier}" and "{date}" is displayed instead of actual carrier and date.

 

I have found this post https://www.prestashop.com/forums/topic/230876-solved-showing-carrier-in-email-template-not-working/ but it is for PrestaShop 1.5 and I could not find analogy with PS 1.6.

 

Please help!

 

Regards,

Grega

Link to comment
Share on other sites

  • 3 months later...

Hi there!

 

I'm still praying for a solution in order to display {carrier} and {date} in Shipped email. Currently in a Shipped e-mail I got "{carrier}" and "{date}" instead of real carrier name and date of order.

 

I'll be gratefull for your help.

 

Kind Regards,

Grega

Link to comment
Share on other sites

  • 3 months later...

In case you're still looking for a solution in PS 1.6:

 

Go to Controllers / Admin / AdminOrdersController.php

 

On line 522 you'll find this code:

$carrier = new Carrier($order->id_carrier, $order->id_lang);
						$templateVars = array();

Change it to this, and add the correct variables you need. I personally added carrier and delay.

$carrier = new Carrier($order->id_carrier, $order->id_lang);	
		$templateVars = array(
					'{carrier}' => $virtual_product ? Tools::displayError('No carrier') : $carrier->name,
					'{delay}' => $carrier->delay
				);

You can find the variables you need (such as date) in classes / paymentmodule.php starting on line 693.

 

Hope it helps.

Edited by Christiaan_01 (see edit history)
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...