Lab of Team Net World

how to fetch shopping cart items details in magento

To get individual item details in the shopping cart use the following code.

<?php

//load shopping cart

$shopping_cart = Mage::getModel(“checkout/cart”);

$cart_items = $shopping_cart->getItems();

foreach($cart_items as $item)

{

echo $item->getQty();

echo $item->getSku();

//use var_dump($item); to get all the elements In the $item object

}

?>

Comments are closed.

Idc1998.com
This domain has recently been listed in the marketplace. Please click here to inquire.