function sendXml()
 {
     echo 'Processing...<br />';
     $order_id = JRequest::getVar('orderid');
     $tid = JRequest::getVar('tid');
     $data = JRequest::get('post');
     $specials = array();
     foreach ($data as $k => $d) {
         if (strpos($k, 'specialentry_') !== false) {
             $data = explode('_', $k);
             // 0: specialentry, 1: tid, 2: specialentry id
             $specials[$data[2]] = $d;
         }
     }
     require_once JPATH_COMPONENT . DS . 'assets' . DS . 'export_helper.php';
     $ehelper = new OnepageTemplateHelper($order_id);
     $ehelper->processTemplate($tid, $order_id, $specials);
     $ehelper->checkFile();
     $mainframe = JFactory::getApplication();
     $mainframe->close();
     die;
 }