// MERGE with 1.4 r7770

This commit is contained in:
rMalie
2011-07-28 09:20:57 +00:00
parent 60b07cacb9
commit c17e7c236d
968 changed files with 26082 additions and 3937 deletions
+4 -5
View File
@@ -91,7 +91,7 @@ class OrderHistoryCore extends ObjectModel
/* If becoming unlogable => removing sale */
elseif (!$newOS->logable AND ($oldOrderStatus AND $oldOrderStatus->logable))
ProductSale::removeProductSale($product['id_product'], $product['cart_quantity']);
if (!$isValidated AND $newOS->logable AND isset($oldOrderStatus) AND $oldOrderStatus AND $oldOrderStatus->id == _PS_OS_ERROR_)
if (!$isValidated AND $newOS->logable AND isset($oldOrderStatus) AND $oldOrderStatus AND $oldOrderStatus->id == Configuration::get('PS_OS_ERROR'))
{
Product::updateQuantity($product);
}
@@ -115,7 +115,7 @@ class OrderHistoryCore extends ObjectModel
}
}
static public function getLastOrderState($id_order)
public static function getLastOrderState($id_order)
{
$id_order_state = Db::getInstance()->getValue('
SELECT `id_order_state`
@@ -180,12 +180,11 @@ class OrderHistoryCore extends ObjectModel
$links = $context->smarty->fetch(_PS_MAIL_DIR_.$iso.'/download-product.tpl');
$tmpArray = array('{nbProducts}' => count($virtualProducts), '{virtualProducts}' => $links);
$data = array_merge ($data, $tmpArray);
global $_LANGMAIL;
Mail::Send((int)($order->id_lang), 'download_product', Mail::l('Virtual product to download'), $data, $result['email'], $result['firstname'].' '.$result['lastname']);
Mail::Send((int)$order->id_lang, 'download_product', Mail::l('Virtual product to download', $order->id_lang), $data, $result['email'], $result['firstname'].' '.$result['lastname']);
}
if (Validate::isLoadedObject($order))
Mail::Send((int)($order->id_lang), $result['template'], $topic, $data, $result['email'], $result['firstname'].' '.$result['lastname']);
Mail::Send((int)$order->id_lang, $result['template'], $topic, $data, $result['email'], $result['firstname'].' '.$result['lastname']);
}
return true;