public function getalldetailsbyclientidajaxAction() { try { //echo "it works!"; $request = $this->getRequest(); if ($this->getRequest()->isPost()) { $clientid = $request->client_id; $this->_helper->layout->disableLayout(); $this->_helper->viewRenderer->setNoRender(); $mapper = new Gyuser_Model_AddressDataMapper(); $Obj = new Gyuser_Model_Address(); $Obj->setClient_id($clientid); $addresses = $mapper->GetAddressByClientId($Obj); $mapper = new Gyuser_Model_BankAccountsDataMapper(); $obj = new Gyuser_Model_BankAccounts(); $obj->setUser_id($clientid); $bankdetails = $mapper->GetBankDetailsByUserId($obj); $mapper = new Gyuser_Model_PriorOperationsDataMapper(); $obj = new Gyuser_Model_PriorOperations(); $obj->setClient_id($clientid); $prior = $mapper->GetPriorByClientId($obj); $mapper = new Gyuser_Model_OperationsDataMapper(); $obj = new Gyuser_Model_Operations(); $obj->setClient_id($clientid); $operations = $mapper->GetOperationsByClientId($obj); $mapper = new Gyuser_Model_UserDataMapper(); $obj = new Gyuser_Model_User(); $obj->setId($clientid); $clientInfo = $mapper->findContacto($obj); $clientDetails = array('bankdetails' => $bankdetails, 'addresses' => $addresses, 'prior' => $prior, 'operations' => $operations, 'clientInfo' => $clientInfo); if ($clientDetails) { echo json_encode($clientDetails); } else { echo "f"; } } } catch (Exception $e) { echo $e; } }