0
我已经在我的自定义外部的Magento page--获取注意注意:未定义的常量sales_flat_order_status_history用途 - 假设“sales_flat_order_status_history”
<?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();
}
此查询给我下面error--
下面收集查询创建注意:未定义的常量sales_flat_order_status_history用途 - 假设“sales_flat_order_status_history”
我不知道,有什么不对吗?