1

The do so i have used below code but it iswn't working

 $productId = Mage::getModel('sales/quote_item')
                           ->addAttributeToSelect(array('product_id'))
                           ->addAttributeToFilter('quote_id', array('eq' => $quoteid))
                            ->load();

1 Answer 1

1

Try this:

$storeid = "your_store_id"; 
 $store = Mage::getSingleton('core/store')->load($storeid);
$quote = Mage::getModel('sales/quote')->setStore($store)->load($quote_id);

$allItems = $quote->getAllItems();

foreach($allItems as $item){
   echo $productId = $item->getProductId()."<br>";
}

So basically you are getting the quote first and then loading all the items of that quote, then you can grab the product id (resides in table sales_flat_quote_item) from there.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.