I'm creating an abstract class that is extending Mage_Payment_Model_Method_Abstract
.
When I run
$quote = Mage::getSingleton('checkout/session')->getQuote();
$cartItems = $quote->getAllVisibleItems();
foreach ($cartItems as $item) {
Mage::log($item->getSku(),null,'test.log',true);
}
I get nothing in the logs about this. How can I get access to the items?
Update
Thanks to Amit's answer below I was able to find out how to get the sku for the order
$orders = Mage::getModel('sales/order_collection');
foreach($orders as $order){
$items = $order->getAllVisibleItems();
foreach($items as $item){
$sku = $item->getSku();
}
}