Show Credentials on WHMCS Product Page
Added by astuffedtiger on 2017-05-16 19:36:09
username}";
        $password = "{$service->password}";
        $password = decrypt($password);
        /* If the username isn't empty let's show them! */
        if ($username != '') {
            /*
                Add a panel to the end of the secondary sidebar for credentials.
                Declare it with the name "credentials" so we can easily retrieve it
                later.
            */
            $secondarySidebar->addChild('credentials', array(
                'label' => 'Credentials',
                'uri' => '#',
                'icon' => 'fa-desktop',
            ));
            /* Retrieve the panel we just created. */
            $credentialPanel = $secondarySidebar->getChild('credentials');
            /* Move the panel to the end of the sorting order so it's always displayed
            as the last panel in the sidebar. */
            $credentialPanel->moveToBack();
            /* Show the username. */
            $credentialPanel->addChild('username', array(
                'label' => $username,
                'order' => 1,
                'icon' => 'fa-user',
            ));
            /* Show the password. */
            $credentialPanel->addChild('password', array(
                'label' => $password,
                'order' => 2,
                'icon' => 'fa-lock',
            ));
        }
    });