wakaka Posted July 28, 2011 Share Posted July 28, 2011 Hello all, I`m using prestashop 1.4.3 In the delivery method opc, "Leave a message If you would like to add a comment about your order, please write it below." How to display the contents of the text that has been inputted by the customer to appear in the last step bankwire, above button "I confirm my order" In mysql I see the record in the ps_message I've added <p>{$message->message|escape:'htmlall':'UTF-8'}</p> in modules/bankwire/payment_execution.tpl, but nothing appear. Maybe $smarty->assign need to add in bankwire.php, But i don`t have a clue what has to add. Help needed. Thanks. Link to comment Share on other sites More sharing options...
bellini13 Posted July 28, 2011 Share Posted July 28, 2011 try to edit bankwire.php, and replace the existing execPayment function, with this new one. I have not tested this, but it should work. it basically gets the message for this cart, and then adds it to smarty using the keyname message public function execPayment($cart) { if (!$this->active) return ; if (!$this->_checkCurrency($cart)) Tools::redirectLink(__PS_BASE_URI__.'order.php'); global $cookie, $smarty; $message = Message::getMessageByCartId((int)($cart->id))); $smarty->assign(array( 'message' => $message, 'nbProducts' => $cart->nbProducts(), 'cust_currency' => $cart->id_currency, 'currencies' => $this->getCurrency((int)$cart->id_currency), 'total' => $cart->getOrderTotal(true, Cart::BOTH), 'this_path' => $this->_path, 'this_path_ssl' => Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/'.$this->name.'/' )); return $this->display(__FILE__, 'payment_execution.tpl'); } Link to comment Share on other sites More sharing options...
wakaka Posted July 28, 2011 Author Share Posted July 28, 2011 Thanks for your answer bellini13. Your code: $message = Message::getMessageByCartId((int)($cart->id))); unexpected error in ")" so i remove it to: $message = Message::getMessageByCartId((int)($cart->id)); But still not shown. For information, in order-opc-new-account.tpl input area is using $oldMessage : <textarea id="message" name="message" cols="26" rows="3"> {if isset($oldMessage)}{$oldMessage}{/if}</textarea> And i need to show zone name (from ps_zone name)too in modules/bankwire/payment_execution.tpl. What has to add? Any more solution? Thanks again. 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