renaud2263 Posted July 2, 2016 Share Posted July 2, 2016 Hi All, In my PS 1.6.1, all the email (confirm, preparation, shipped etc...) show the variable "reference" {order_name} instead of {id_order}. For the customers it's not easy to remember this random mix of letters and numbers. So I think it's possible to replace {order_name} by {id_order} in all email templates but i'm looking for a quicker and easier solution: modify the php file which pilots these templates and modify it to assign $id_order to {order_name} instead of reference. Could you help me ? What is the class or controller concerned by email templates ? Link to comment Share on other sites More sharing options...
codetheweb Posted July 3, 2016 Share Posted July 3, 2016 Hi, $id_order is not defined on the controller of the mails You should call it Link to comment Share on other sites More sharing options...
renaud2263 Posted July 3, 2016 Author Share Posted July 3, 2016 Hi and thanks. Finally I found the solution after a good night Everywhere it was needed, I overrided classes/controllers and replace the {order_name} instruction, by example: I whish to modify the contact form and show the order_id instead of reference, I replace : $orders[] = array('value' => $order->id, 'label' => $order->getUniqReference().' - '.Tools::displayDate($date[0], null) , 'selected' => (int)$this->getOrder() == $order->id); by $orders[] = array('value' => $order->id, 'label' => $order->id.' - '.Tools::displayDate($date[0], null) , 'selected' => (int)$this->getOrder() == $order->id); And the mail templates : '{order_name}' => $order->getUniqReference(), By '{order_name}' => (int)$order->id, And all is ok. Link to comment Share on other sites More sharing options...
codetheweb Posted July 3, 2016 Share Posted July 3, 2016 (edited) Glad you've find the solution Do not hesitate post paste your topic on solved Edited July 3, 2016 by Lefty_sarl (see edit history) Link to comment Share on other sites More sharing options...
SamPlissken Posted January 19, 2017 Share Posted January 19, 2017 Can you tell me where you've made these changes ? I'm interested to have the order id in some mails, but not all of them. I wonder if your solution could help me. Thanks ! 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