eugen01 Posted August 16, 2013 Share Posted August 16, 2013 (edited) Hello Prestashop community . I'm having a bit of trouble with a payment module I just installed for a Prestashop 1.5 store . The problem I'm having is that if payment is denied by the bank , the order is placed normally (with an "Authorization denied ..." status ) but the confirmation email that the customer receives doesn't say anything about this . I realise that I'm supposed to modify the mailalerts module in order to insert order status into the email , but I can't figure out how exactly . If you could help me figure this out , or alternatively suggest a better solution , I would be very grateful . Thanks in advance . Please ... anyone ? Edited August 19, 2013 by eugen01 (see edit history) Link to comment Share on other sites More sharing options...
eugen01 Posted August 20, 2013 Author Share Posted August 20, 2013 Wow , I didn't think this would be much of a problem for experienced developers . Does anyone know how I could at least stop the confirmation email from being sent if payment fails ? Thank you . P.S. : I'm sorry for replying to my own post .. but I am getting a bit desperate. Link to comment Share on other sites More sharing options...
mfedorets Posted August 24, 2013 Share Posted August 24, 2013 In MailAlerts module find hookActionValidateOrder method and add order state variable initialization after $order variable has been initialized (after line 268). $orders_status = $order->getCurrentState(); Then add this var to initialization of $template_vars array, something like this: '{orders_status}' => $order_status, and you will be able to use this template variable in ./modules/mailalerts/mails/en/new_order.html Link to comment Share on other sites More sharing options...
gongorajorge Posted August 10, 2016 Share Posted August 10, 2016 (edited) Hi, i have a similar situation, i want to add the "$orders_status" in the order confirmation. i already did this in ...themes/default-bootstrap/mails/es/order_conf.html, but in the email confirmation the client receive is not working, it just shows the code. The mailalert module by dafeault have in the var list the variable i´m trying to use: '{order_status}' => $order_state->name, Im trying to do this because the payment system even if the payment wasnt sucessful sends anyway the order confirmation, so we need to check in that send email the current order status without to enter the PS order dashboard. for example: Order Status: Waiting for payment, or Payment Sucessful etc. I really appreciate any advice to solve this Edited August 10, 2016 by gongorajorge (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