Goto admin>System>Configuration>Checkout>Shopping Cart>Configurable Product Image
make it Product Thumbnail Itself
this make child product image
Instead of sending
$_item->getProductId()
send $_item
and put somelogic
$_item
for configurable product $_Item>getSku give child product a other time give main products.
so just child product using item sku
I guess you have used third party extension so i have change some change according my concept
change
Step1:instead of send product send all item object
findColorImage($_item->getProductId(),$product_base,'color', 'image');
to
findColorImage($_item,$product_base,'color', 'image');
Step2: some change on function
public function findColorImage($item, $arr, $key, $type)
{
/* $value set here*/
$value=$item->getProductId();
$found = '';
if(isset($arr[$key])) {
$total = count($arr[$key]);
if($total>0)
{
for($i=0; $i<$total;$i++)
{
if($value == ucwords($arr[$key][$i]))//if it matches the color listed in the attribute
{
$found = $arr[$type][$i];//return the image src
}
}
}
}
if ($found == '') {
if (isset($arr['image'])){
$found = $arr['image'][0];
}
}
/* for configurable product send child product image */
if($item->getProductTypeId="configurable"){
$ChildProduct=Mage::getModel('catalog/product')->loadByAttribute('sku',$item->getSku());
$found=Mage::helper('catalog/image')->init($ChildProduct, 'thumbnail');
}
return $found;
}
I recall something similar happening to a site some time ago (year+) - for some reason I cannot find my question regarding the issue.
Basically:
cart totals got multiplied (sometimes 3 times) AFTER shipping was applied to the quote object. So after you leave cart to checkout, or in cart applied shipping.
In my case it was an errand 3rd party extension that had an observer, which added in a shipping address to the Quote object. Since there was already a shipping address selected, it ended up adding a 3rd address (and a 4th and so on, as you go back and forth between checkout and cart)
So, the quote object had:
1 x Billing address
2 x Shipping Address
Since totals are calculated on addresses, magento #1 internals faithfully iterated both the shipping addresses, and tallied up the totals.
I don't recall the exact details, but it was tracked down by wiping all order / order address data in the relevant tables. Then entering the checkout, and checking the order tables tables for entries.
It was then found multiple address were being inserted into the order address table.
Maybe your issue not the exact same issue, but may also be related to multiple addresses being attached to the quote.
Hope that helps in some way.
Best Answer
I have found the solution
after adding following code in checkout_cart_item_renderers.xml