It is possible to do some collection in checkout/cart ? I tried this one but it doesn't work . My objectif is to get all items cart then filter them by attribute.
$_cart = Mage::getModel('checkout/cart')->getCollection()
->addAttributeToSelect('*')
->addAttributeToFilter('attribute', 'value')
->setPageSize(100);
foreach ($_cart as $item) {
echo $item->getPrice();
}
or
$items= Mage::getSingleton('checkout/cart')->getQuote()->getItemsCollection();
// I dont know if it is possible to add a filter on it.