It is currently Mon Feb 24, 2020 8:05 am

All times are UTC + 5:30 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sat Jan 12, 2013 3:38 am 

Joined :
Sat Jan 12, 2013 3:27 am

Posts : 1
Hi Support team,

I've bought this extension for a while and it was working on my testing site. Now I installed it on my production site but the notification email doesn't send out. I went to Notification Customers Grid View page and Mail Status column was shown NO. Do you have any ideas about this issue?

Note: I've disabled the original Product Alerts at
Admin > Configuration > Catalog > Product Alerts (No)

Thanks in advance!
Ken


Report this post
Top
 Profile  
 
PostPosted: Sat Feb 09, 2013 2:46 pm 
Apptha Team

Joined :
Tue Sep 25, 2012 5:29 pm

Responses Posted : 106
Hi Ken,

In order to check with the Email notification, please make use of the below file path and replace the below code in the file path and check it from your end. If you still face the same problem, you can Email us at support@apptha.com. So that we can help you.

Here is the file path:
\app\code\local\Apptha\Outofstocknotification\Model\Observer.php

Here is the code:
public function _sendNotificationEmail($to, $templateConfigPath = self::XML_PATH_EMAIL_ADMIN_QUOTE_NOTIFICATION )
{
if (! $to) return;

$sendTo = array();

foreach ($to as $recipient)
{
if (is_array($recipient))
{
$sendTo[] = $recipient;
}
else
{
$sendTo[] = array(
'email' => $recipient,
'name' => null,
);
}
}
$this->productDescr = substr($this->productDescr , 0 , 420);
if(strlen($this->productDescr) > 420)
{
$this->productDescr .= '...';
}
$emailTemplateVariables = array();
$emailTemplateVariables['productName'] = $this->productName;
$emailTemplateVariables['productUrl'] = $this->productUrl;
$emailTemplateVariables['productImg' ] = $this->prodcutImg;
$emailTemplateVariables['storeName'] = $this->storeName;
$emailTemplateVariables['siteLink'] = $this->siteLink;
$emailTemplateVariables['productDesc'] = $this->productDescr;


$marchentNotificationMailId = Mage::getStoreConfig('Outofstocknotification/outofstock_email/outofstock_sender_email_identity');
$senderMailId = Mage::getStoreConfig("trans_email/ident_$marchentNotificationMailId/email");
$senderName = Mage::getStoreConfig("trans_email/ident_$marchentNotificationMailId/name");
$templeId = (int)Mage::getStoreConfig('Outofstocknotification/outofstock_email/outofstock_credit_template');

if($templeId) //if it is user template then this process is continue
{
$emailTemplate = Mage::getModel('core/email_template')->load($templeId);
}
else{ // we are calling default template
$emailTemplate = Mage::getModel('core/email_template')
->loadDefault('outofstock_email_template');
}

$emailTemplate->setSenderName($senderName); //mail sender name
$emailTemplate->setSenderEmail($senderMailId); //mail sender email id
$emailTemplate->setTemplateSubject('Out of stock Notification from '.$this->storeName );
$emailTemplate->setDesignConfig(array('area' => 'frontend'));
$processedTemplate = $emailTemplate->getProcessedTemplate($emailTemplateVariables); //it return the temp body

foreach ($sendTo as $recipient) {
$emailTemplate->send($recipient,$senderName, $emailTemplateVariables); //send mail to customer email ids
}
}

Thanks,
Sharomi.M.D


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