Created
March 28, 2013 15:54
-
-
Save razbakov/5264327 to your computer and use it in GitHub Desktop.
utb order export
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Mark orders as exported | |
* | |
* @params $orderId int Order ID that should be marked as exported. | |
* @return Phoenix_Logwin_Model_Orders | |
*/ | |
protected function _setOrderExportStatus($order, $exportStatus = 0, $historyMarker = self::ORDER_EXPORT_HISTORY_MARKER) | |
{ | |
$exportStatus = $order->getExportStatus()|$exportStatus; | |
$order->setExportStatus($exportStatus); | |
if (!isset($this->_exportedOrdersByStatus[$exportStatus])) { | |
$this->_exportedOrdersByStatus[$exportStatus] = array($order->getId()); | |
}else { | |
$this->_exportedOrdersByStatus[$exportStatus][] = $order->getId(); | |
} | |
//$order->getResource()->isPartialSave(true);die; | |
//$order->save(); | |
/* | |
$order->addStatusToHistory( | |
$order->getStatus(), | |
$historyMarker | |
)->save(); | |
* | |
*/ | |
return $this; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment