2

I am working on Joomla 3.6 and I am very new in joomla. I am fetching the data from an api and I want to pass that data to a view. How can I do that.

Controler: user.php

public function profile() {
    $wskey = sdafsda;
    $companycode = 'sdafsd';
    $client = 1;
    $cardno = 'sdafsd';
    $pin = 'sdaf';
    $wsdl = 'http://example/service.asmx?wsdl';

    $getdata = array(
        'WSKey' => $wskey,
        'CompanyCode' => $companycode,
        'CardNo' => $this->EncryptData($cardno),
        'Client' => $client,
        'PIN' => $this->EncryptData($pin),
    );

    $soapClient = new SoapClient($wsdl);

    try {
        $result = $soapClient->GetProfile($getdata);
    } catch (Exception $e) {
        return $e;
    }
}

And view is created in com_users->views->cprofile.

I want to show this data in default.php of cprofile views and Want to know how can I call a view with data.

Sorry might not be clear.

silentcoder
  • 992
  • 3
  • 9
  • 21

0 Answers0