Below is my code in question. I will list a few things below it.
if ($product->getTypeId() == 'configurable') {
$child = $product->getTypeInstance(true)->getProductByAttributes($params['super_attribute'], $product);
$product = $child;
}
$message = $this->__('%s was added to your shopping cart.', Mage::helper('core')->escapeHtml($product->getName()));
$response['status'] = 'SUCCESS';
$response['message'] = $message;
$this->loadLayout();
$topCart = $this->getLayout()->getBlock('topCart')->toHtml();
$response['topCart'] = $topCart;
$response['image'] = (string)Mage::helper('catalog/image')->init($product, 'thumbnail');
$response['name'] = $product->getname();
$response['price'] = Mage::helper('core')->formatPrice($product->getPrice(), true);
When $product is a simple product outright, there is no issue. The functions $product->getname(), $product->getPrice(), and init($product, 'thumbnail'), all return valid results.
When $product is found to be configurable, it's child product replaces it. I can then get the name, thumbnail but when I call the getprice function I get no results.
I don't understand why this would be. Anyone out there care to elucidate?