获取订单内的订单商品
我需要在订单循环中获取订单商品,如何实现这一点,这是我的代码 $orderCollection = Mage::getModel("sales/order")->getCollection(); foreach ($orderCollection as $order) { $orders['orders'][] = array( 'id' => $order->getIncrementId(), 'store' => 'magento', 'status' => $order->getStatus(), 'name' => $order->getCustomerName(), 'email' => $order->getCustomerEmail(), 'telephone' => $order->getShippingAddress()->getTelephone(), 'street' => $order->getShippingAddress()->getStreet(), 'pincode' => $order->getShippingAddress()->getPostcode(), 'city' => $order->getShippingAddress()->getCity(), 'weight' => $order->getWeight(), ); foreach ($order->getAllItems() as $item) { $orders['items'][] = …