Get all items in cart currently in Magetno

<?php $cart = Mage::getModel(‘checkout/cart’)->getQuote(); foreach ($cart->getAllItems() as $item) { $productId =$item->getProduct()->getId(); $productName = $item->getProduct()->getName(); $productPrice = $item->getProduct()->getPrice(); } ?>

Get Customer billing address by Customer Id magento

<?php $customerid = 1; $costomerdata = Mage::getModel(‘customer/customer’)->load($customerid); $billingaddress = Mage::getModel(‘customer/address’)->load($costomerdata ->default_billing); $addressdata = $billingaddress ->getData(); echo $addressdata[‘street’]; echo $addressdata[‘city’]; echo $addressdata[‘postcode’]; …