Skip to content

Commit

Permalink
Merge pull request #12 from OXID-eSales/master-remove_order_insert
Browse files Browse the repository at this point in the history
Remove insert from Order model
  • Loading branch information
T-Kuchel authored Jul 11, 2017
2 parents 4832eb8 + 395a106 commit 6b3934c
Showing 1 changed file with 0 additions and 39 deletions.
39 changes: 0 additions & 39 deletions extend/application/models/fcPayOneOrder.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -654,45 +654,6 @@ protected function _fcpoCheckRefNr()
return $sReturn;
}

/**
* Overrides standard oxid _insert method
*
* Inserts order object information in DB. Returns true on success.
*
* @return bool
*/
protected function _insert()
{
$oConfig = $this->_oFcpoHelper->fcpoGetConfig();
$sShopVersion = $oConfig->getVersion();
if (version_compare($sShopVersion, '4.7.0', '<')) {
return parent::_insert();
}

$oUtilsDate = $this->_oFcpoHelper->fcpoGetUtilsDate();

//V #M525 orderdate must be the same as it was
if (!$this->oxorder__oxorderdate->value) {
$this->oxorder__oxorderdate = new oxField(date('Y-m-d H:i:s', $oUtilsDate->getTime()), oxField::T_RAW);
} else {
$this->oxorder__oxorderdate = new oxField($oUtilsDate->formatDBDate($this->oxorder__oxorderdate->value, true));
}

$this->oxorder__oxshopid = new oxField($oConfig->getShopId(), oxField::T_RAW);
$this->oxorder__oxsenddate = new oxField($oUtilsDate->formatDBDate($this->oxorder__oxsenddate->value, true));

if (( $blInsert = parent::_insert())) {
// setting order number
if (!$this->oxorder__oxordernr->value) {
// $blInsert = $this->_setNumber();
} else {
$oCounter = $this->_oFcpoHelper->getFactoryObject('oxCounter');
$oCounter->update($this->_getCounterIdent(), $this->oxorder__oxordernr->value);
}
}
return $blInsert;
}

/**
* Overrides standard oxid save method
*
Expand Down

0 comments on commit 6b3934c

Please sign in to comment.