This is the code I use, which is not working, in order to make all of active quotes for the logged user to inactive, but it keeps taking only one quote.
$quote = Mage::getSingleton('sales/quote');
$quoteID = $quote->getId();
while ($quoteID)
{
// Set inactive
$quote->setIsActive(0);
$quote->save();
// find next inactive quote <- NOT WORKING! $quoteID STAYS THE SAME!
$quote = Mage::getSingleton('sales/quote');
$quoteID = $quote->getId();
}
Mage::getSingleton()
returns always the same instance, so at no point in your script, another quote is loaded.