John Black Smith Posted November 2, 2012 Share Posted November 2, 2012 On order-confirmation page, it says 'An e-mail has been sent to you with this information.' I want to show the customer email like 'An e-mail has been sent to your email [email protected] with this information. Where to change this ?? Link to comment Share on other sites More sharing options...
bellini13 Posted November 2, 2012 Share Posted November 2, 2012 in the themes folder will be a file named order-confirmation.tpl. You would need to alter this file to include the customer email. To display the email, you should be able to use {$email} Link to comment Share on other sites More sharing options...
John Black Smith Posted November 2, 2012 Author Share Posted November 2, 2012 What do i have to change else? If i use the {$email} i get nothing back Link to comment Share on other sites More sharing options...
bellini13 Posted November 3, 2012 Share Posted November 3, 2012 have you enabled force compile? whenever you change a template file you need to re-compile the template. Link to comment Share on other sites More sharing options...
Carlsen Posted November 21, 2012 Share Posted November 21, 2012 Please see this post from Alexander Simonchik: http://stackoverflow.com/questions/13193067/prestashop-howto-show-customer-email-on-order-confirmation-page Link to comment Share on other sites More sharing options...
sebkos Posted November 21, 2012 Share Posted November 21, 2012 Hi, at first text 'An e-mail has been sent to you with this information.' is not a part of order-confirmation.tpl but payment-return.tpl files of your payment modules (bankwire, cheque...). So you need to delete that text from payment-return.tpl then add something like this into order-confirmation.tpl <p>{l s='An e-mail has been sent to your email '}{$email}{l s=' with this information.'}</p> Next little OrderConfirmationController.php modification change or override original function public function initContent() { parent::initContent(); $this->context->smarty->assign(array( 'is_guest' => $this->context->customer->is_guest, 'HOOK_ORDER_CONFIRMATION' => $this->displayOrderConfirmation(), 'HOOK_PAYMENT_RETURN' => $this->displayPaymentReturn() )); if ($this->context->customer->is_guest) { $this->context->smarty->assign(array( 'id_order' => $this->id_order, 'reference_order' => $this->reference, 'id_order_formatted' => sprintf('#%06d', $this->id_order), 'email' => $this->context->customer->email // works only if customer is guest )); /* If guest we clear the cookie for security reason */ $this->context->customer->mylogout(); } $this->setTemplate(_PS_THEME_DIR_.'order-confirmation.tpl'); } with this public function initContent() { parent::initContent(); $this->context->smarty->assign(array( 'is_guest' => $this->context->customer->is_guest, 'HOOK_ORDER_CONFIRMATION' => $this->displayOrderConfirmation(), 'HOOK_PAYMENT_RETURN' => $this->displayPaymentReturn(), 'email' => $this->context->customer->email // works for registered and guest customers )); if ($this->context->customer->is_guest) { $this->context->smarty->assign(array( 'id_order' => $this->id_order, 'reference_order' => $this->reference, 'id_order_formatted' => sprintf('#%06d', $this->id_order), )); /* If guest we clear the cookie for security reason */ $this->context->customer->mylogout(); } $this->setTemplate(_PS_THEME_DIR_.'order-confirmation.tpl'); } 1 Link to comment Share on other sites More sharing options...
redtango2 Posted November 30, 2012 Share Posted November 30, 2012 Does it work with PS 1.5.2. ? Best reagrds Link to comment Share on other sites More sharing options...
sebkos Posted November 30, 2012 Share Posted November 30, 2012 works with PS 1.5.2 Link to comment Share on other sites More sharing options...
redtango2 Posted November 30, 2012 Share Posted November 30, 2012 Thanks i test it 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