function createOrder() { global $toC_Json, $osC_Language, $osC_Currencies; $osC_Currencies = new osC_Currencies(); $data = array('customers_id' => $_REQUEST['customers_id'], 'customers_name' => $_REQUEST['customers_firstname'] . ',' . $_REQUEST['customers_lastname'], 'customers_email_address' => $_REQUEST['customers_email_address']); $orders_id = osC_Order::createOrder($data); if ($orders_id > 0) { $response = array('success' => true, 'orders_id' => $orders_id, 'feedback' => $osC_Language->get('ms_success_action_performed')); } else { $response = array('success' => false, 'feedback' => $osC_Language->get('ms_error_action_not_performed')); } echo $toC_Json->encode($response); }