253 public static function renew(array $filter = array())
256 $parameters = array(
"select" => array(
'ID'));
259 $parameters[
'filter'] = $filter;
262 $archivedOrderData = self::getList($parameters);
263 while ($archiveRow = $archivedOrderData->fetch())
265 $idList[] = $archiveRow[
'ID'];
271 $idListChunk = array_chunk($idList, 1000);
272 foreach ($idListChunk as $chunk)
274 $packedData = OrderArchivePackedTable::getList(array(
275 "filter" => array(
"ORDER_ARCHIVE_ID" => $chunk)
278 while ($packed = $packedData->fetch())
280 $orderData = unserialize($packed[
'ORDER_DATA'], [
'allowed_classes' =>
false]);
281 if (is_array($orderData[
'ORDER']))
283 $preparedOrderData = array_intersect_key($orderData[
'ORDER'], array_flip(
Sale\Archive\Manager::getOrderFieldNames()));
284 $result = self::update($packed[
'ORDER_ARCHIVE_ID'], $preparedOrderData);
285 if (!$result->isSuccess())