history init
This commit is contained in:
parent
adcdd015b9
commit
c4553a0f58
@ -25,7 +25,7 @@ class Retailcrm_Retailcrm_Model_Exchange
|
|||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function orderCreate($order)
|
public function ordersCreate($order)
|
||||||
{
|
{
|
||||||
$this->_config = Mage::getStoreConfig('retailcrm', $order->getStoreId());
|
$this->_config = Mage::getStoreConfig('retailcrm', $order->getStoreId());
|
||||||
|
|
||||||
@ -122,6 +122,18 @@ class Retailcrm_Retailcrm_Model_Exchange
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function ordersHistory()
|
||||||
|
{
|
||||||
|
$this->_config = Mage::getStoreConfig('retailcrm');
|
||||||
|
|
||||||
|
$statuses = array_flip(array_filter($this->_config['status']));
|
||||||
|
$paymentsStatuses = array_flip(array_filter($this->_config['paymentstatus']));
|
||||||
|
$payments = array_filter($this->_config['payment']);
|
||||||
|
$shippings = array_filter($this->_config['shipping']);
|
||||||
|
|
||||||
|
Mage::log(var_export($this->_config, TRUE), null, 'history.log');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $customer
|
* @param $customer
|
||||||
* @return mixed
|
* @return mixed
|
||||||
|
@ -15,7 +15,7 @@ class Retailcrm_Retailcrm_Model_Observer
|
|||||||
public function orderCreate(Varien_Event_Observer $observer)
|
public function orderCreate(Varien_Event_Observer $observer)
|
||||||
{
|
{
|
||||||
$order = $observer->getEvent()->getOrder();
|
$order = $observer->getEvent()->getOrder();
|
||||||
Mage::getModel('retailcrm/exchange')->orderCreate($order);
|
Mage::getModel('retailcrm/exchange')->ordersCreate($order);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -28,4 +28,9 @@ class Retailcrm_Retailcrm_Model_Observer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function importHistory()
|
||||||
|
{
|
||||||
|
Mage::getModel('retailcrm/exchange')->ordersHistory();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -62,6 +62,10 @@ SOFTWARE.
|
|||||||
<schedule><cron_expr>* */4 * * *</cron_expr></schedule>
|
<schedule><cron_expr>* */4 * * *</cron_expr></schedule>
|
||||||
<run><model>retailcrm/observer::exportCatalog</model></run>
|
<run><model>retailcrm/observer::exportCatalog</model></run>
|
||||||
</icml>
|
</icml>
|
||||||
|
<history>
|
||||||
|
<schedule><cron_expr>*/5 * * * *</cron_expr></schedule>
|
||||||
|
<run><model>retailcrm/observer::importHistory</model></run>
|
||||||
|
</history>
|
||||||
</jobs>
|
</jobs>
|
||||||
</crontab>
|
</crontab>
|
||||||
<adminhtml>
|
<adminhtml>
|
||||||
|
Loading…
Reference in New Issue
Block a user