I can successfully convert convert an order into quote but I still couldn't load it into current cart. I tried several methods but to no avail. Here's the simplest one:
$_quote = Mage::getModel('sales/convert_order')->toQuote($order)->save();
$_quote = Mage::getModel('sales/quote')->load($_quote->getId());
$_quote->setIsActive(true)->save();
I was able to get the quote ID but the quote object doesn't load to the current cart.
I also tried
$_quote = Mage::getModel('sales/convert_order')->toQuote($order)->save();
$_quote = Mage::getModel('sales/quote')->load($_quote->getId());
if ($_checkoutQuote->getId() != $_quote->getId() && $_quote->getId()) {
$_checkoutQuote->merge($_quote)->save();
Mage::getModel('checkout/session')
->setQuote($_checkoutQuote)
->init();
Mage::getSingleton('checkout/session')->getQuote()->setIsActive(true)->save();
}
and similar approaches but still not loading the quote. Thank you very much!