タイトルはそれをほとんど説明しています、私はちょうど6-8から6-12の間の夜通しの輸送で出荷されるすべての注文番号を手に入れる必要があります。
感謝するのを手伝ってください
これを達成するための少なくとも1つの方法があります...
$from = "2012-06-08";
$to = "2012-06-12";
$shippingMethod = "overnight_shipping";
$orderIds = Mage::getResourceModel('sales/order_shipment_collection')
->addAttributeToFilter('created_at', array(
'from' => $from,
'to' => $to,
))
->getColumnValues('order_id')
;
$incrementIds = Mage::getResourceModel('sales/order_collection')
->addAttributeToFilter('shipping_method', array('eq' => $shippingMethod))
->addAttributeToFilter('entity_id', array('in' => $orderIds))
->getColumnValues('increment_id')
;
echo "<ul>";
foreach($incrementIds as $incrementId) {
echo "<li>" . $incrementId . "</li>";
}
echo "</ul>";