mirror of
https://github.com/retailcrm/opencart-module.git
synced 2024-11-25 22:56:07 +03:00
rename vars
This commit is contained in:
parent
47e205b988
commit
1ffbd61162
@ -44,19 +44,19 @@ class ModelExtensionRetailcrmHistory extends Model
|
|||||||
? new DateTime($history['retailcrm_history'])
|
? new DateTime($history['retailcrm_history'])
|
||||||
: new DateTime(date('Y-m-d H:i:s', strtotime('-1 days', strtotime(date('Y-m-d H:i:s')))));
|
: new DateTime(date('Y-m-d H:i:s', strtotime('-1 days', strtotime(date('Y-m-d H:i:s')))));
|
||||||
|
|
||||||
$packs = $crm->ordersHistory(array(
|
$packsOrders = $crm->ordersHistory(array(
|
||||||
'startDate' => $lastRun->format('Y-m-d H:i:s'),
|
'startDate' => $lastRun->format('Y-m-d H:i:s'),
|
||||||
), 1, 100);
|
), 1, 100);
|
||||||
$packsCustomers = $crm->customersHistory(array(
|
$packsCustomers = $crm->customersHistory(array(
|
||||||
'startDate' => $lastRun->format('Y-m-d H:i:s'),
|
'startDate' => $lastRun->format('Y-m-d H:i:s'),
|
||||||
), 1, 100);
|
), 1, 100);
|
||||||
if(!$packs->isSuccessful() && count($packs->history) <= 0 && !$packsCustomers->isSuccessful() && count($Customers->history) <= 0)
|
if(!$packsOrders->isSuccessful() && count($packsOrders->history) <= 0 && !$packsCustomers->isSuccessful() && count($Customers->history) <= 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
$orders = RetailcrmHistoryHelper::assemblyOrder($packs->history);
|
$orders = RetailcrmHistoryHelper::assemblyOrder($packsOrders->history);
|
||||||
$customers = RetailcrmHistoryHelper::assemblyCustomer($packsCustomers->history);
|
$customers = RetailcrmHistoryHelper::assemblyCustomer($packsCustomers->history);
|
||||||
|
|
||||||
$generatedAt = $packs['generatedAt'];
|
$generatedAt = $packsOrders['generatedAt'];
|
||||||
|
|
||||||
$this->subtotalSettings = $this->model_setting_setting->getSetting('sub_total');
|
$this->subtotalSettings = $this->model_setting_setting->getSetting('sub_total');
|
||||||
$this->totalSettings = $this->model_setting_setting->getSetting('total');
|
$this->totalSettings = $this->model_setting_setting->getSetting('total');
|
||||||
|
Loading…
Reference in New Issue
Block a user