itai Posted April 15, 2017 Share Posted April 15, 2017 Hello everbody, I have a really stupid and strange bug, All my email texts(sender email, subject, body) are being manipulated before sending... All text including "id" replaced with "PAY-XXXXXX..." i guess it's a payment id, but it's replaceing all text "id" not {id}, This is really stupid since my email contain "id" and my store name and products contain "id" so this breakes all my emails, Total Tax paPAY-67F68610KP691852MLDZHLMI instad of "Total Tax paid" and my email sent from: sales@kpay-67f68610kp691852mldzhlmiiwatch.co.ilinstead of : sales@kidiwatch.co.il p.s : the id changes every order so it's also change senders... I suspect this is from paypal addon, or a bug in the core Please help me fix it, it's completly breaks my emails. see attached image thanks allot !!! Link to comment Share on other sites More sharing options...
itai Posted April 15, 2017 Author Share Posted April 15, 2017 update: 1: the PDF invoice attached to the email is fine, not effected by this bug, only the content of the emails, 2: i do not use any addons exept PayPal and the cores modules, and i use CLASSIC Theme. so it's must be papal addon or core bug... i guess... Link to comment Share on other sites More sharing options...
itai Posted April 16, 2017 Author Share Posted April 16, 2017 update #2: Found out that PAY-xxxxxxx is paypal payment id reference by looking in the database field "payment_id" in "paypal_orders" table, So i guess paypal addon is the problem, But I still can't find where in the addon source an "id" variable is pushed to the confirmation email... Nobody had this problem before? this is SO WEIRD... Link to comment Share on other sites More sharing options...
itai Posted April 17, 2017 Author Share Posted April 17, 2017 nobody? this drives me crazzzzzyyy!! this is a bug in the official paypal addon in prestashop 1.7 ... Link to comment Share on other sites More sharing options...
itai Posted April 17, 2017 Author Share Posted April 17, 2017 SOLVED could not find where papal enter this specific variable so i unset it just before the swift mailer gets all the varibles... at file classes/Mail.php add this: //fix paypal id messing up email $templateVars['{paypal_id}'] =$templateVars['id']; unset($templateVars['id']); before the line (~line 390) : $swift->registerPlugin(new \Swift_Plugins_DecoratorPlugin(array($toPlugin => $templateVars))); Link to comment Share on other sites More sharing options...
Sandra HC Posted May 4, 2017 Share Posted May 4, 2017 I have the same problem and couldn't believe it only happened to me!! Thanks for sharing!! i'm not web programmer but let's see how can I manage to edit code (I have no choice anyway) 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