email integration - Custom message in New Order Confirmation Shippin Method Magento CE -
i trying setup custom message in new order confirmation email "shipping method" when selects shipping method "store pickup" @ checkout. in db method name called flatrate2. here snippet attempting edit...
if ($method) { foreach ($address->getallshippingrates() $rate) { if ($rate->getcode()==$method) { $amountprice = $address->getquote()->getstore()->convertprice($rate->getprice(), false); $this->_setamount($amountprice); $this->_setbaseamount($rate->getprice()); if (!$method=='flatrate2'){ $shippingdescription = $rate->getcarriertitle() . ' - ' . $rate->getmethodtitle();} else{ $shippingdescription = 'your merchandise ready pickup 45 minutes after completing order.<br/>store pickup available mon – friday 11:30 – 4:30 pm';} $address->setshippingdescription(trim($shippingdescription, ' -')); break; } } }
no matter shipping method selected message 'your merchandise ready pickup 45 minutes after completing order.
store pickup available mon – friday 11:30 – 4:30 pm'
any appreciated. thank you!
within code this: if ($method=='your specific shipping ') { $shippingdescription = $rate->getcarriertitle() . ' - ' . $rate->getmethodtitle();}
elseif($method=='your other shipping method ') { $shippingdescription = $rate->getcarriertitle() . ' - ' . $rate->getmethodtitle();}
and on.
to summarize times code condition if (!$method=='flatrate2'){ failing resulting in else condition getting executed.
Comments
Post a Comment