Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $collection = Mage::getModel('sales/order')->getCollection();
- $collection->addFieldToFilter(
- 'updated_at',
- array('from' => $dateStart, 'to' => $dateEnd)
- );
- $collection->addFieldToFilter(
- 'status',
- 'complete'
- );
- foreach ($collection as $order) {
- $items = $order->getAllItems();
- foreach ($items as $itemId => $item) {
- $cats = $item->getCategoryIds();
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement