metal1616 Posted September 15, 2016 Share Posted September 15, 2016 (edited) Hi, I'm trying to show the message that is added in the step of the addresses, the textarea of "Observations of the order", and I will show in the last step before the pay that show a order summary. Regards!. Edited September 26, 2016 by metal1616 (see edit history) Link to comment Share on other sites More sharing options...
rocky Posted September 18, 2016 Share Posted September 18, 2016 You'll need to override the ParentOrderController::_assignSummaryInformations function to assign the customer message to the template and then add it to the order payment templates in your theme. 1 Link to comment Share on other sites More sharing options...
metal1616 Posted September 19, 2016 Author Share Posted September 19, 2016 Thanks rocky! But I'm trying to do this, but the problem is that I don't know how to take the value of the "message". I see in OrderController.php in the function: public function processAddress() { The code in wich the value is collected from the form: if (Tools::isSubmit('message')) { $this->_updateMessage(Tools::getValue('message')); } But I don't know how to retrieve the value in ParentOrderController::_assignSummaryInformations function. Any idea? Link to comment Share on other sites More sharing options...
metal1616 Posted September 22, 2016 Author Share Posted September 22, 2016 Please!! I need help, I'm trying to do this during two weeks and don't know how to do.. Any help, please? Link to comment Share on other sites More sharing options...
rocky Posted September 24, 2016 Share Posted September 24, 2016 Try using this in the ParentOrderController::_assignSummaryInformations function.: $message = Message::getMessageByCartId((int)$this->context->cart->id); $this->context->smarty->assign('message', $message->message); 1 Link to comment Share on other sites More sharing options...
metal1616 Posted September 26, 2016 Author Share Posted September 26, 2016 Thank you so much rocky! I solved it! But the correct lexical is this: $message = Message::getMessageByCartId((int)$this->context->cart->id); $this->context->smarty->assign('message', $message['message']); I will change the name of the post to [solved]. Thanks again rocky. Link to comment Share on other sites More sharing options...
webper Posted January 4, 2019 Share Posted January 4, 2019 Hello! How to do it in a prestashop 1.7? I need the same Thank you! 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