@wickedclown
Okay, so here's the situation as I see it...
- The order status does update from the order details page
- The order status also updates from the batch page
- You can successfully e-mail your customer on a status update from the order details page
- You CANNOT send the same e-mail from the batch page
Super Orders uses a single function -- email_latest_status() -- to e-mail order status updates
regardless of where they originate.
That fact, combined with the list above, means that the problem resides with the batch file's call to this function.
I should have asked earlier, but what version of PHP are you using? I'm wondering if the syntax that calls this function is not the problem. Open
admin/super_batch_status.php, and go all the way to the bottom, find this line...
Code:
if ($notify == 1) email_latest_status($oID);
Note the lack of curly braces { }. I want you to add those braces so it looks like the following...
Code:
if ($notify == 1) {
email_latest_status($oID);
}
Then, as a precautionary measure, lets make sure that $notify is actually being set properly. Go back to the top of the page, and find this line...
Code:
$notify = $_POST['notify'];
Let's define this so that it's set as a variable type
int, like this...
Code:
$notify = (int)$_POST['notify'];
Based on all the information you've provided, that's about the only possible cause; it
must be somewhere in the code that actually calls the email_latest_status() function within super_batch_status.php.
If you still have the issue after these steps, trying echo'ing out the $notify variable both outside and inside the batch_status() function. It would look something like this...
Code:
// DEBUG
echo '<br />' . $notify . '<br />';
That may tell you more about what is being (or not being) passed. If that doesn't make sense, or the thought terrifies you, just report back what happened with the code changes.