Merge branch 'evo-DBorderCurrentState'

This commit is contained in:
Marion Muszynski 2016-09-08 11:58:45 +02:00
commit 86bb7a1413

View File

@ -1,5 +1,25 @@
<?php
class OrderHistory extends OrderHistoryCore {
public function add($autodate = TRUE, $nullValues = FALSE) {
if($result = parent::add($autodate, $nullValues)) {
Db::getInstance()->ExecuteS('
INSERT INTO `'._DB_PREFIX_.'order_state_current`
VALUES (
'.(int) $this->id_order.',
'.(int) $this->id_order_state.',
NOW()
)
ON DUPLICATE KEY UPDATE
`id_order_state` = '.(int) $this->id_order_state.',
`date_upd` = NOW()
');
return $result;
}
return FALSE;
}
public function addWithemail($autodate = true, $templateVars = false) {
$lastOrderState = $this->getLastOrderState($this->id_order);