如何以编程方式从Magento中的php访问所有订单和所有发票?
答案 0 :(得分:24)
<?php
require_once("app/Mage.php");
$app = Mage::app('');
$salesModel=Mage::getModel("sales/order");
$salesCollection = $salesModel->getCollection();
foreach($salesCollection as $order)
{
$orderId= $order->getIncrementId();
echo $orderId;
}
?>