News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Unwanted code comment

Started by marcodelpercio, March 07, 2012, 14:19:49 PM

Previous topic - Next topic

marcodelpercio

The VirtueMartModelOrders class has a strange code comment into the updateStatusForOneOrder function.
Maybe I'm wrong but I supposed that the $inputOrder['customer_notified'] value should have determined whether Virtuemart 2 had to actually notify the customer or not.

Now in VM 2.0.0 the situation was the following:

// Check if the customer needs to be informed */
if ($order['customer_notified']) {
$order['virtuemart_order_id'] =$virtuemart_order_id ;
$this->notifyCustomer($order,  $order['comments'],  $order['customer_notified']);
}


Currently in VM 2.0.2 the situation has changed like this:

// When the plugins did not already notified the user, do it here (the normal way)
//Attention the ! prevents at the moment that an email is sent. But it should used that way.
// if (!$inputOrder['customer_notified']) {
$this->notifyCustomer( $data->virtuemart_order_id , $inputOrder );
// }


as you can see the if has been commented out and in practice if you use the updateStatusForOneOrder method to update an order you will ALWAYS notify the customer regardless of the $inputOrder['customer_notified'] value. The question is WHY?
Do I have to write my own function to update a single order without notifying customer? Wouldn't be just easier using the ['customer_notified'] value to determine it?

Thanks