grega33 Posted February 18, 2015 Share Posted February 18, 2015 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 More sharing options...
fred-vinapresta Posted February 18, 2015 Share Posted February 18, 2015 Hi, that is because these variables don't exist, you need to create these variables and pass them to smarty in the script that send the email (i think it is in OrderState class or AdminOrdersController.php file) Link to comment Share on other sites More sharing options...
grega33 Posted February 18, 2015 Author Share Posted February 18, 2015 Hi, Fred-vinapresta! I'm familiar with computers but not a developer, so I will be more than gratefull if you can help me some more. Looking forward to your reply. Regards, Grega Link to comment Share on other sites More sharing options...
grega33 Posted February 24, 2015 Author Share Posted February 24, 2015 Hi! Can you please help me some more? Thank you and Regards, Grega Link to comment Share on other sites More sharing options...
grega33 Posted June 2, 2015 Author Share Posted June 2, 2015 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 More sharing options...
Christiaan_01 Posted September 10, 2015 Share Posted September 10, 2015 (edited) 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 September 10, 2015 by Christiaan_01 (see edit history) 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