User choose "ACCEPTED" from dropdown menu and click submit button, after that test.php of these path plus given below function must execute. How i will able to do this?
Path:
/var/www/html/demo/courier/test.php
Here is the function:
if($testcodPayment->getMethodInstance()->getTitle() == 'Cash On Delivery' && $status == $statusAccepted && ($checkTrack12[0]['number']=='') && $selectCourier == 'couriername'){
include '/var/www/html/demo/courier/test.php' ;
$awbNumbercouriername = $hlp->couriernameawbgenerate('couriername',$id);
$title = Mage::getStoreConfig('carriers/'.$method[0].'/title', $store);
$track = Mage::getModel('sales/order_shipment_track')
->setNumber($awbNumbercouriername)
->setCarrierCode($method[0])
->setCourierName('couriername')
->setTitle('couriername');
$shipment->addTrack($track);
Mage::helper('shipmenty')->addShipmentComment(
$shipment,
$this->__('%s addeddd tracking ID %s', $vendor->getVendorName(), $awbNumbercouriername)
);
$session->addSuccess($this->__('Tracking ID has been added. Please take three printouts of each manifest and keep one copy of airway bill signed by courier boy with you as proof of pick up. '));
$highlight['tracking'] = true;
$customerMessage = 'Your order has been shipped. Tracking Details.Shipment#: '.$_shipmentId.' , Track Number: '.$awbNumberFedex.'Courier Partner : www.fedex.com - Craftsvilla.com (Customercare email: customercare@craftsvilla.com)';
$_customerSmsUrl = $_smsServerUrl."username=".$_smsUserName."&password=".$_smsPassowrd."&type=0&dlr=0&destination=".$customerTelephone."&source=".$_smsSource."&message=".urlencode($customerMessage);
$parse_url = file($_customerSmsUrl);
$shipment->save();
}