Once user Uploaded custom image on Product image & Add item to cart, than we want to display custom image below "Recently added items" instead of normal product image.
custom uploaded image :
we are saving custom image in path : media/custom_options/quote . custom image path in table : "sales_flat_quote_item_option" in column : "value"
1.code to display normal product image :
app/design/frontend/rwd/theme/template/checkout/cart/minicart/default.phtml
<!--Custom product image code -->
<?php $_helper = $this->helper('catalog/output');
$_product = $this->getProduct();
if($_product->getAttributeSetId()==9)
{
// code for display custom image
}
else
{
?>
<!--Normal product image code -->
<?php echo $this->getProductThumbnail()->resize(50, 50)->setWatermarkSize('30x10'); ?>
I tried below code , but its not displaying custom image under Recently added items : Mage_Checkout_Block_Cart_Item_Renderer.php
protected function _getImageSrc($optionValue)
{
if(file_exists($optionValue['fullpath']))
{
$pathNew = str_replace(DS.'media'.DS.'custom_options', '', $optionValue['order_path']);
$image = Mage::getModel('aitcg/image');
$image->copyImage($optionValue['fullpath'], $image->getEmailPath().$pathNew);
return $image->getEmailUrl().$pathNew;
}
return false;
}
As we are saving custom image in path : media/custom_options/quote how to display that custom image under "Recently added items".....
upload image
andsave design
andadd to cart
and go for cart page.... in cart page you can see both normal and customized image....Recently added items
also.....id=""preview_container899967386" //any number
on cart page. may be they are storing something into quote object