2017-05-31 15:24:46 +03:00
|
|
|
<?php
|
2018-03-12 16:34:48 +03:00
|
|
|
|
2017-05-31 15:24:46 +03:00
|
|
|
namespace Retailcrm\Retailcrm\Cron;
|
|
|
|
|
2018-03-12 16:34:48 +03:00
|
|
|
class OrderHistory
|
|
|
|
{
|
2017-05-31 15:24:46 +03:00
|
|
|
protected $_logger;
|
|
|
|
|
2018-03-12 16:34:48 +03:00
|
|
|
public function __construct()
|
|
|
|
{
|
2017-05-31 15:24:46 +03:00
|
|
|
$om = \Magento\Framework\App\ObjectManager::getInstance();
|
2018-03-12 16:34:48 +03:00
|
|
|
$logger = new \Retailcrm\Retailcrm\Model\Logger\Logger($om);
|
|
|
|
$this->_logger = $logger;
|
2017-05-31 15:24:46 +03:00
|
|
|
}
|
2018-03-12 16:34:48 +03:00
|
|
|
|
|
|
|
public function execute()
|
|
|
|
{
|
2017-05-31 15:24:46 +03:00
|
|
|
$history = new \Retailcrm\Retailcrm\Model\History\Exchange();
|
|
|
|
$history->ordersHistory();
|
|
|
|
|
2018-03-12 16:34:48 +03:00
|
|
|
$this->_logger->writeRow('Cron Works: OrderHistory');
|
|
|
|
}
|
|
|
|
}
|