42 \Bitrix\Main\Loader::includeModule(
'sale');
44 $daysBasketForgotten = $this->
getFieldValue(
'DAYS_BASKET_FORGOTTEN');
45 if(!is_numeric($daysBasketForgotten))
46 $daysBasketForgotten = 90;
48 $dateFrom = new \Bitrix\Main\Type\DateTime;
49 $dateTo = new \Bitrix\Main\Type\DateTime;
51 $dateFrom->setTime(0, 0, 0)->add(
'-' . $daysBasketForgotten .
' days');
52 $dateTo->setTime(0, 0, 0)->add(
'1 days')->add(
'-' . $daysBasketForgotten .
' days');
54 if($this->isRunForOldData())
67 $filter = $filter + array(
68 '!FUSER.USER_ID' =>
null,
70 '=LID' => $this->getSiteId(),
73 $userListDb = \Bitrix\Sale\Internals\BasketTable::getList(array(
74 'select' => array(
'USER_ID' =>
'FUSER.USER_ID',
'EMAIL' =>
'FUSER.USER.EMAIL',
'FUSER_USER_NAME' =>
'FUSER.USER.NAME'),
79 'order' => array(
'USER_ID' =>
'ASC')
82 if($userListDb->getSelectedRowsCount() > 0)
84 $userListDb->addFetchDataModifier(array($this,
'getFetchDataModifier'));
85 $this->recipient = $userListDb;