It is currently Mon Feb 24, 2020 7:21 am

All times are UTC + 5:30 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Email Product Image
PostPosted: Mon May 13, 2013 9:23 pm 

Joined :
Thu May 02, 2013 6:13 pm

Posts : 1
We have recently installed this extension and everything seems to be working fine, except the product image is not appearing in the customer email. It simply displays the default Magento product image. Has this issue been noticed before, and is there a quick way to fix this?


Report this post
Top
 Profile  
 
 Post subject: Re: Email Product Image
PostPosted: Tue May 21, 2013 12:56 pm 

Joined :
Tue Jul 05, 2011 3:40 pm

Posts : 50
Hi,

Here the steps to resolve your image problem,

Login to FTP and get the file : "observer.php" in the path : /app/code/local/Apptha/Outofstocknotification/Model/observer.php

Comment the below code
-------------------------------

/*$getProductImageList = json_decode($product->_data['media_gallery']['images']); //get images
for($i = 0 ; $i < count($getProductImageList) ; $i++ )
{
if(!$getProductImageList[$i]->removed)
{
if(!$getProductImageList[$i]->disabled && $getProductImageList[$i]->position == 1 && !$getProductImageList[$i]->removed){
$prodcutImageIs = $getProductImageList[$i]->url;
break;
}
else if(!$getProductImageList[$i]->disabled && !$getProductImageList[$i]->removed){
$prodcutImageIs = $getProductImageList[$i]->url;
}
}
}
$this->prodcutImg = $prodcutImageIs; */


Use this code instead of above code
---------------------------------------------

$product_id=$product->getId();
require_once 'app/Mage.php';
Mage::app('default');
$products = Mage::getModel('catalog/product')->load($product_id);
$this->prodcutImg = $products->getImageUrl();


Thanks,
Shalini R


Report this post
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 5:30 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron