dongze5043
2014-10-08 14:19
浏览 129
已采纳

如何在Magento API之外获取Quote数据?

I am trying to write a script to process all the orders from my magento store. I am able to get Shipping,Billing address and customer's name but now I want the list of items they have bought which i think will be in "quote" object.

I am trying this 2 lines to get quote object but I am getting an empty array. Please tell me what's wrong with this code.

$salesCollection = Mage::getModel("sales/order")->getCollection()->addAttributeToFilter('state', array('eq' => Mage_Sales_Model_Order::STATE_PROCESSING));
foreach($salesCollection as $order)
{
   $quote_id = $order->getQuoteId();
   $quote = Mage::getModel('sales/quote')->load($quote_id);
   print_r($quote->getData());
}
  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

2条回答 默认 最新

相关推荐 更多相似问题