I need to send order email in this shipping_arrival_time
how to send this
observer.php
class Bc_Deliverydate_Model_Observer
{
public function checkout_controller_onepage_save_shipping_method($observer)
{
if (Mage::getStoreConfig('deliverydate/deliverydate_general/on_which_page')==1){
$request = $observer->getEvent()->getRequest();
// $quote = $observer->getEvent()->getQuote();
$quotes = Mage::getModel('sales/quote')->getCollection();
$desiredArrivalDate = Mage::helper('deliverydate')->getFormatedDeliveryDateToSave($request->getPost('shipping_arrival_date', ''));
if (isset($desiredArrivalDate) && !empty($desiredArrivalDate)){
$quotes->setShippingArrivalDate($desiredArrivalDate);
$quotes->setShippingArrivalComments($request->getPost('shipping_arrival_comments'));
$quotes->setShippingArrivalTime($request->getPost('shipping_arrival_time'));
$quotes->save();
}
}
return $this;
}
}
Best Answer
copy app/code/local/Mage/Sales/Model/Order.php or or rewrite core files. better is to rewrite:
After that edit transaction email on below path in admin: System > Transnational Emails > New Order Email
and in template access variable like below