I have a problem of changing the image of configurable product in ajax cart based on product image. I want to have product image in ajax cart after selection.
Here is the controller code which should reflects the change.
if (!$this->_getSession()->getNoCartRedirect(true)) {
if (!$cart->getQuote()->getHasError()){
$message = $this->__('%s was successfully added to your shopping cart.', $product->getName());
$img = "<img src='".Mage::helper('catalog/image')->init($product, 'image')->resize(60,null)."' />";
$tmp_product = '<div id="message_ajax"><div class="ajaxcart_image">'.$img.'</div><div class="ajaxcart_message">'.$message.'</div></div>';
$check = 'success';