我在自定义外部magento页面中创建了以下集合查询 -
<?php
$mageFilename = 'app/Mage.php';
require_once $mageFilename;
Mage::setIsDeveloperMode(true);
ini_set("display_errors", 1);
ini_set('max_execution_time', 3000);
umask(0);
Mage::init('default');
Mage::app();
$start_date='2016-03-01';
$end_date='2016-04-01';
$orderCollection=Mage::getModel('sales/order')->getCollection();
try{
$orderCollection->getSelect()->join(array('order_history'=> sales_flat_order_status_history), "main_table.entity_id=order_history.parent_id WHERE (order_history.entity_name = 'invoice' OR order_history.entity_name = 'shipment') AND order_history.status = 'complete' AND order_history.created_at >= '".$start_date."' and order_history.created_at < '".$end_date."' ", array('order_history.parent_id'));
}
catch(Exception $e)
{
echo $e->getMessage();
}
此查询给出了以下错误 -
注意:使用未定义的常量sales_flat_order_status_history - 假设为'sales_flat_order_status_history'
我不知道,有什么不对吗?
答案 0 :(得分:0)
我不知道,问题是什么,但我通过将其转换为我的自定义查询来解决这个问题 -
$rootScope.$on('$cordovaLocalNotification:click', function(event, notification, state) {
// Your function here
})