Messages not sent
Permalink Browser Info Environment
One of our clients was having an issue where the special instructions were not being sent. Looking at the error logs on the server, it pointed me to the follow section in
around line 61
if $ui is not passed in for whatever reason, the email will not be sent. I changed this to
which seems to have solved the problem. I'm not sure if the c5 ecommerce module changed the way it fires the Event recently, but if the user was not signed in, then the $ui variable was not an object.
Just thought I would share this in case anyone else runs into this as well.
packages/core_commerce_special_instructions/models/special_instructions.php
$mh->to($order->getOrderEmail(), $ui->getAttribute('billing_first_name') . ' ' . $ui->getAttribute('billing_last_name')); // get order email to information
if $ui is not passed in for whatever reason, the email will not be sent. I changed this to
if (is_object($ui)) { $mh->to($order->getOrderEmail(), $ui->getAttribute('billing_first_name') . ' ' . $ui->getAttribute('billing_last_name')); // get order email to information } else { $mh->to($order->getOrderEmail()); }
which seems to have solved the problem. I'm not sure if the c5 ecommerce module changed the way it fires the Event recently, but if the user was not signed in, then the $ui variable was not an object.
Just thought I would share this in case anyone else runs into this as well.
Type: | Discussion |
---|---|
Status: | New |
Thanks!
Andrew