Magento get Quote Session Items Product List


Magento get Quote Session Items Product List : You can get the list of products in quote from the quote session.
You get product detail from the quote session.


Magento get Quote Session Items Product List From Admin Quote

If you are working on magento admin quote you can get the Quote details – Product list as below

$Quote = Mage::getModel('adminhtml/session_quote')->getQuote();
foreach $Quote->getAllItems() as $item) {
    $product = $item->getProduct();
    $productId = $product->getId();
    $name = $product->getName();
    $price = $product->getPrice();
}

Magento get Quote Session Items Product List From Cart Quote

If you are working on magento cart quote you can get the Quote details – Product list with detail as below

$Quote = Mage::getModel('checkout/cart')->getQuote();
foreach $Quote->getAllItems() as $item) {
    $product = $item->getProduct();
    $productId = $product->getId();
    $name = $product->getName();
    $price = $product->getPrice();
}

Thus you can detail of products which has been in cart’s/Quote’s. This can be helpful when you are working with quote items.


Advertisements

Add Comment

📖 Read More