magento – get quote in admin

Getting the current or session quote on admin is different that on front office.
I be sure to get the right one, use this :

 if(Mage::app()->getStore()->isAdmin()) {
   $quote = Mage::getSingleton('adminhtml/session_quote')->getQuote();
 }else{
   $quote = Mage::getSingleton('checkout/session')->getQuote();
 }

Leave a Reply