cancel
Showing results for 
Search instead for 
Did you mean: 

Cart store in selected customer account

Cart store in selected customer account

Cart store in selected customer account.

$session = Mage::getSingleton('checkout/session');
$current_quote_id = $session->getQuoteId();
$currentQuote = Mage::getModel('sales/quote')->load($current_quote_id);
$currentQuoteItem = $currentQuote->getAllItems();

$newQuote = Mage::getModel('sales/quote');
$newQuote->assignCustomer($customer);
$newQuote->addItem($currentQuoteItem);
$newQuote->setQuote($newQuote);
$newQuote->collectTotals()->save();

$newQuote = Mage::getModel('sales/quote'); => Not Load

$newQuote = Mage::getSingleton('sales/quote');  => Not Load

How to Load this model ?