i am updating the cart after user login for that
Error
Fatal error: Call to a member function getStoreId() on null in /opt/lampp/htdocs/instantsearch/app/code/core/Mage/Sales/Model/Quote/Item/Abstract.php on line 81
Code
foreach ($items->getAllItems() as $item) {
$product_id = $item->getProductId();
$customprice = 50;
if ($customprice > 0)
{
$item= Mage::getModel('sales/quote_item')->load($item->getId());
$item->setCustomPrice($customprice);
$item->setOriginalCustomPrice($customprice);
$item->save();
}
}