Tuesday, February 14, 2012

magento the shipment email is not sent


Solution Works For Me
Go to -> Mage_Sales_Model_Order_Shipment and copy the file Api.php
Make a path like this in local folder app/code/local/Mage/Sales/Model/Order/Shipment
Edit Api.php 
In function Create comment the sendEmail function call
try { 
$transactionSave = Mage::getModel(’core/resource_transaction’) 
->addObject($shipment) 
->addObject($shipment->getOrder()) 
->save(); 
/*$shipment->sendEmail($email, ($includeComment ? $comment : ‘’));*/ 
} catch (Mage_Core_Exception $e) { 
$this->_fault(’data_invalid’, $e->getMessage()); 

In function addTrack add function call sendEmail
try { 

$shipment->save(); 
$track->save(); 
$email=true; 
$shipment->sendEmail($email,’’); 
} catch (Mage_Core_Exception $e) { 
$this->_fault(’data_invalid’, $e->getMessage()); 
}
Now you Shipment Email will be send as usual email with tracking number

1 comment:

  1. You can also refer to the following article if you want to send shipment email when tracking info is added:
    http://www.blog.magepsycho.com/sending-shipment-email-when-tracking-info-added/

    ReplyDelete