Magento Forum

[Admin Sales Order Create Customisation] Get “cart” in loadBloack ajax action
 
Georges@Bitbol
Sr. Member
 
Avatar
Total Posts:  104
Joined:  2008-08-07
Paris, France
 

Hi folks,

I need some help.
I am new to magento. I need to customize the add product action in order creation in admin.

I have to test the product type (one I have add) and catch error oaccroding to products already in “admin cart”.

I succeed in all the steps except getting this admin virtual cart (block “Items ordered").

Does anyone know wheer I could get this object or array of product ?

Thanks all in advance

 
Magento Community Magento Community
Magento Community
Magento Community
 
Georges@Bitbol
Sr. Member
 
Avatar
Total Posts:  104
Joined:  2008-08-07
Paris, France
 

Ok, more research and logs helped me.

For those who could be interested. This allow to get all different product in quote.

$oQuote $this->_getOrderCreateModel()->getQuote();
$aProductsInQuote $oQuote->getAllItems();
        
foreach ( 
$aProductsInQuote as $oProductInQuote {
        
    $oProductTemp 
Mage::getModel('catalog/product')->load(oProductInQuote->getProductId());
}
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top