garciasanchezdani Posted February 27, 2020 Share Posted February 27, 2020 Hi all, We have developed one new email template, named 'pending_documentation'. Ok, in this PrestaShop instance, when new order is made, the customer receive one email with this template, due to this order changes itself to this order state: pending_documentation Everything is ok, and email is arriving well in most of cases, but in some cases emails arrives to the customer with variables names, instead of variables values. For example: Someone can explain to me what's going on? Summary, we prepare one array named $mail_vars, with all custom variables, like: $mail_vars = array( '{producto_precio}' => Tools::displayPrice($amount, $currency) . ' /' . $this->module->l('mes'), . . . ); And then, we use this: $this->module->validateOrder( $cart->id, $payment_status, $amount, $module_name, null, $mail_vars, $currency_id, false, $secure_key ); To validate the order, and send the mail with the $mail_vars. Everything is ok, but I don't understand why it happens. Thanks you very much in advance. Link to comment Share on other sites More sharing options...
marksull Posted July 13, 2020 Share Posted July 13, 2020 Did you end up working out what was causing the intermittent nature of this problem? Link to comment Share on other sites More sharing options...
garciasanchezdani Posted July 13, 2020 Author Share Posted July 13, 2020 Yes mate! It was incredible. The problem was emails introduced by customer, with some letter in uppercase. So the fix was make lowercase of each email, before sending the email. Hope it helps to you. Best regards. 1 Link to comment Share on other sites More sharing options...
marksull Posted July 13, 2020 Share Posted July 13, 2020 OMG. Just changed one of my test accounts to a mixed case, and BAM, the problem occurred! Fantastic find. I'll go and fix my customer accounts. By any chance do you know if a bug has already been raised for this issue? Thanks for the reply! Link to comment Share on other sites More sharing options...
marksull Posted July 13, 2020 Share Posted July 13, 2020 Found the Pull Request: https://github.com/PrestaShop/PrestaShop/pull/16550 Should be fixed in 1.7.7.0 1 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