I have a helper with this method to get the items in a customer's cart
public function getCartData()
{
//Get cart DATA
$quote = Mage::getSingleton('checkout/session')->getQuote();
$cartItems = $quote->getAllVisibleItems();
$items = '';
foreach ($cartItems as $item) {
$items .= $item->getId() . " ";
}
return $items;
}
But what I want to do is replace this line
$items .= $item->getId() . " ";
With an instance of template/checkout/cart/sidebar/default.phtml
How would I go about this? The method is being called in an ajax controller. I want to update the user's cart without a page refresh, but it needs to be formatted.