View Full Version : Joomla Bridge
ok, I've searched and searched, then started over.
There is tons of talk about WHMCS and Joomla, mainly in reference to templates and look/feel.
Does anyone know how to combine the username/password database for Joomla & WHMCS?
It would be so nice if users could just login to joomla, and be already logged into WHMCS. Just my 2c.
:-) Thanks
Tim
Yes I agree. It would be nice if there was a component version for Joomla as well instead of just a bridge.
A Joomla component or module would be pretty cool. Maybe this thread should be moved to the Joomla site to generate some interest from their community... :)
this could work (best) if you use WHMCS as your login, assuming you have adapted the session code in Mambo or Joomla. You should use 1 set of user/passwords only, otherwise you need to synch the databases.
joemailey
11-02-07, 08:06 AM
I'd also like this,
Preferable a bridge.
Not really a bridge.
Something that will sync WHMCS accounts with joomla.
So when you signup to WHMCS you can login to my forum also.
This would help for those who bridge
SMF forum
PHPBB forums to.
Multipack
01-04-08, 06:57 AM
A Joomla component or module would be pretty cool. Maybe this thread should be moved to the Joomla site to generate some interest from their community... :)
Absolutely !!!
But there has to be official addon made first.
angelcosta
02-01-08, 12:15 PM
such thing has been already done. check www.joomlancers.com
I think if we can gather money, we can hire someone to do it. then we can make it available somewhere for free (for the community)
I am more than willing to pay for this.
angelcosta
09-29-08, 07:25 PM
I am working on it
what features would you guys like to see?
cubemedia
10-03-08, 07:47 AM
that would be pretty cool
Has this ever been completed? If so, could you please provide us with a link to the bridge? Thanks in advance!
Has this ever been completed? If so, could you please provide us with a link to the bridge? Thanks in advance!
Im thinking about doing something now.
More of a module than a bridge. But i have to read the code more.
Its a matter of weather we insert details into the J! db.
But i am looking at making some modules that allow you to insert the WHMCS cart and items.
Klangaroo
10-24-08, 03:03 AM
this is EXTREMELY easy to do. just write a short function to make the following call to the WHMCS API while storing the user's joomla profile info in an array called $DetailArray:
$url = "api.php"; # URL to WHMCS API file
$username = "admin"; # Admin username goes here
$password = "admin"; # Admin password goes here
$postfields["username"] = $username;
$postfields["password"] = md5($password);
$postfields["action"] = "addclient";
$postfields["firstname"] = $Detail_Array[firstname];
$postfields["lastname"] = $Detail_Array[lastname];
$postfields["companyname"] = $Detail_Array[business];
$postfields["email"] = $Detail_Array[email];
$postfields["address1"] = $Detail_Array[address];
$postfields["address2"] = $Detail_Array[address2];
$postfields["city"] = $Detail_Array[city];
$postfields["state"] = $Detail_Array[state];
$postfields["postcode"] = $Detail_Array[postcode];
$postfields["country"] = "AU";
$postfields["phonenumber"] = $Detail_Array[phone];
$postfields["password2"] = $Detail_Array[password];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($ch);
curl_close($ch);
$data = explode(";",$data);
foreach ($data AS $temp) {
$temp = explode("=",$temp);
$results[$temp[0]] = $temp[1];
}
if ($results["result"]=="success") {
# Result was OK!
echo("Success, new client id is ". $results["clientid"]);
} else {
# An error occured
echo "The following error occured: ".$results["message"];
}
then just save the user's $clientID into a field in the joomla user table. You can then submit their username and password to the WHMCS login page using a link on your joomla homepage.
We did the same thing on our website, but we dont use Joomla. its the same deal though.
I've never actually used Joomla, but if it's writen in PHP with MySQL, then you should be able to use this code (mostly borrowed from the WHMCS API documentation) to do what you want to do.
This is kinda th idea but most people want to user WHMCS as the master and then have the data goto into Joomla!.
Its possible using the plugin auth of Joomla! to make this module.
Excellent! Thank you. I take it there are no pre-made modules/components for Joomla to do this yet?
Klangaroo
10-26-08, 09:17 PM
This is kinda th idea but most people want to user WHMCS as the master and then have the data goto into Joomla!.
Its possible using the plugin auth of Joomla! to make this module.
why would people want the WHMCS to be the master account creation page? People use Joomla! so it's the frontend, not the backend.
Then again I can't imagine what's going through the heads of people who use Joomla! anyway, so I can't really say much to contribute :P
Zorro67
10-27-08, 12:25 AM
@Kl, no think you mis-understand. Shaun is talking from a frontend perpsective.
Perhaps a detailed description might help.
Imagine that all your dynamic content is on a joomla site, but logins and users management are done using a WHMCS login.
When a user logs into whmcs (either in the WHMCS section or on a WHMCS login box with the Joomla area), WHMCS user info is bridged (& obviously inserted) to Joomla user data.
Sessions/ cookie session handling then allows Joomla content to be displayed that is available only to Joomla registered users. This sessions handling then needs to be maintained between transitions betwwen joomla & WHMCS parts of the site.
tehn all it takes is some good templating to give the 2 parts of the site a cohesive look, eliminating the need to use a joomla wrapper.
hope this adds some clarity
Klangaroo
10-27-08, 02:39 AM
ah yeah i get what you're saying. I chose to build my own user database and my own login/logout/details system (in effect, the same as using Joomla! to manage users) and I didn't wanna use WHMCS' addin content for logging in.
Basically I didn't wanna use any WHMCS page content on my system, I just wanted to API as much as possible. If you're willing to use WHMCS addins then I guess it's best to make WHMCS the master credential handler then.
Makes sense.
edit:
the reason being that we are a fully fledged ISP, and WHMCS only handles the hosting part of our services, so people will be making accounts and adding internet services. It's not until they chose "Add Hosting Service" that the WHMCS API is called and duplicates their credentials into a WHMCS account.
Zorro67
10-28-08, 12:13 AM
Cheers K. That also makes more sense.
There's been so much talk about this topic, that SOME-ONE has to make a start.
For those who are looking to do this, I've come across a piece of code that could open a joomla session from within whmcs (step 2 from my post above).
So lets see if we can get a couple of others that know more about coding than I, to run with this towards a bridge.
Re user syncing, i have some other code snippets that could be useful, but I'm gonna hang on to them in case there's no community interest from here.
Note: I haven't yet got this running, but it comes from a trusted source.
//================================================== =========================
// START JOOMLA
define( '_VALID_MOS', 1 );
header('Content-Type: text/html; charset=iso-8859-1');
// search for config
if (file_exists('configuration.php')) require_once('configuration.php'); else
if (file_exists('../configuration.php')) require_once('../configuration.php'); else
if (file_exists('../../configuration.php')) require_once('../../configuration.php'); else
if (file_exists('../../../configuration.php')) require_once('../../../configuration.php');
require_once($mosConfig_absolute_path.'/includes/joomla.php');
require_once($mosConfig_absolute_path.'/includes/database.php');
require_once($mosConfig_absolute_path.'/includes/sef.php');
require_once( $mosConfig_absolute_path .'/includes/frontend.php' );
// load Language
if (file_exists($mosConfig_absolute_path.'/language/' . $mosConfig_lang . '.php'))
include_once($mosConfig_absolute_path.'/language/' . $mosConfig_lang . '.php');
else include_once($mosConfig_absolute_path.'/language/english.php');
// Load dB
if ( $mosConfig_db != "")
{
$database = new database( $mosConfig_host, $mosConfig_user, $mosConfig_password, $mosConfig_db, $mosConfig_dbprefix );
}
$mainframe = new mosMainFrame( $database, '', '.' );
// $mainframe->initSession();
// JOOMLA STARTED
//================================================== =========================
mysmallbizu
10-28-08, 02:31 AM
Joomla 1.5 la has a API that should be used... at least to sync usernames/email addresses and passwords from whmcs to joomla.
http://api.joomla.org/
http://docs.joomla.org/Framework which includes calls to add/edit users
http://docs.joomla.org/Framework#User
Anyone interested in working on it?
Redundant
10-28-08, 12:03 PM
@Zorro - Howdy Zorro | I believe that code is from Joomla 1.0. All the "mos" stuff (mosMainFrame, mosConfig, etc) I believe is gone with Joomla 1.5. I need this bridge too, for similar reasons you explained in an earlier post. Well put. I'm starting to work on it, but am hindered by poor PHP skills.
To add to mysmallbizu fine list above, here is an outstanding article on Joomla Authentication:
http://docs.joomla.org/Tutorial:Creating_an_Authentication_Plugin_for_Joo mla_1.5
Seems the largest gap in this bridge is WHMC's lack of a API call to log users in? (Related Link: http://forum.whmcs.com/showthread.php?t=14557&highlight=joomla)
plugging away, looking forward to any other thoughts on this...
Zorro67
10-28-08, 10:28 PM
@Redundant, yes, sorry should have qualified that I'm using 1.0.x
Haven't done the upgrade yet, as not all our in use components were 1.5.x compliant, and am too busy to take the upgrade route yet.
So there are a couple of alternatives.
Joomla 1.0.x/ 1.5.x
WHMCS as master or slave (for want of better terms)
mysmallbizu
10-28-08, 11:58 PM
There are open source plugins for both 1.0 and 1.5 that allow for remote mySql authentication. The nice part is that the existing plugins handle all the authentiation issues like sessions/cookies etc... The only reason they dont' work now is because of the way that Whmcs encrypts the passwords.
Perhaps this existing code can be used as a base. All that's needed is the inclusion of the whmcs api call to decrypt the password from the whmcs user table.
Here are the two existing plugins
1.0 MySQL Auth http://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,642/Itemid,35/
1.5 MySQL Auth 1.5
http://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,3444/Itemid,35/
I'm currently using amember.com and their joomla plugin to handle my subscriptions and billing for my membership sites... but would love to consolidate my hosting and joomla business billing with whmcs.
If anyone wants to learn more about Joomla Membership sites I have videos availalbe at http://www.joomlamembershipsite.com
Redundant
10-29-08, 09:21 PM
@mymallbizu - Heya. Thanks for the links. Big help.
I have created an Authentication Plugin (http://forum.whmcs.com/showthread.php?p=79627#post79627) which could used some testing.
This really doesn't help a whole lot, seeing how it doesn't also log the user into WHMCS. Perhaps someone can help with that. The idea presented in this thread about CURL (http://forum.whmcs.com/showthread.php?t=14557&highlight=joomla) is interesting, but I do not know CURL...
The other issue I guess is the reverse. If the user logs in or out of WHMCS it doesn't affect the login status for the Joomla side of things...
Looking forward to anymore thoughts on all this.
gwhosting
11-02-08, 08:38 PM
i would like to see something like this. What i was thinking, not sure how i would do this coding isn't my best thing is, to be able to login to joomla and pass login information into whmcs. Could you do the following? I know this isn't very very secure but:
1. user registers on joomla's site.
2. user enters there whmcs username and password into a forum
3. user information is saved into a database.
4. when someone logs into joomla, the information is taken from the database where they entered the whmcs information into it and passes this into the login form on whmcs.
5. they are logged in?
would that work?
just an idea, and not sure if it could even work.
mike
Zorro67
11-02-08, 08:55 PM
Mike,
(this one is on topic :) )
I depends on how much information you want to capture, how much of those user input information fields already exists in Joomla (default is UN, PW & email), and how you want to use the information.
however, your question is a bit fuzzy. Joomla is great for showing dynamic user-only content, where-as WHMCS isn't.
Can you clarify whether you are looking at a) a login share, user-sync or both, and
and b) Joomla-forum, Joomla to WHMCS, WHMCS to forum or all three.
the reason I ask i there are a couple of WHMCS-forum login shares now running.
Also one of your previous threads says you haven't messed with Joomla. i wouldn't be jumping in the deep end with Joomla on my first investigations of it. Its a bit top heavy, and has a medium steep learning curve for the admin user.
gwhosting
11-02-08, 09:10 PM
Hi;
I was looking for al login share, and second of all was looking for all three.
I do understand that joomla is a bit difficult to learn or well, get started with.
Thanks for that head's up.
Mike
jlovrek
03-23-09, 12:41 PM
Can you give me an idea of where to find the authentication login share you were speaking of? I found a plugin which says whmcsauth but it does not seem to build the user into the whmcs database, only joomla, even with whmcs api url password etc... I want to use joomla as content only but at the same time, have each user stored either in the joomla database or have joomla access to whmcs database so I can use joomla to email all clients, autoresponder plugin etc...
Any help appreciated..
Joe
inverter
03-23-09, 02:30 PM
I'll pay for a Joomla addon.
ok, I've searched and searched, then started over.
There is tons of talk about WHMCS and Joomla, mainly in reference to templates and look/feel.
Does anyone know how to combine the username/password database for Joomla & WHMCS?
It would be so nice if users could just login to joomla, and be already logged into WHMCS. Just my 2c.
:-) Thanks
Tim
jrudesh
04-10-09, 11:59 AM
I'm planing to create a component out of WHMCS for Joomla.
My component is com_whmcs381. In Joomla directory /components/com_whmcs381/whmcs381.php is as following.
<?php
$pathshow=$_GET['pathshow'];
$username = $_POST['username'];
$password = $_POST['password'];
$rememberme = $_POST['rememberme'];
switch ($task) {
default:
case 'normal':
$local="http://www.slesolutions.com/xxxxxxxx/components/com_whmcs381/whmcs/";
$string=$local.$pathshow;
//require($string);
include($string);
break;
case 'form':
$local="http://www.slesolutions.com/xxxxxxxx/components/com_whmcs381/whmcs/";
$command="?username=";
$command .=$username;
$command .="&password=";
$command .=$password;
//$command .="&rememberme=";
//$command .=$rememberme;
$string=$local.$pathshow.$command;
include($string);
break;
}
?>
I planed to grab the WHMCS site by include() to the Joomla site.
It was working with links 100%,(<a href="...)
index.php?option=com_whmcs381&task=normal&pathshow=
but when it comes to user login it falis.
index.php?option=com_whmcs381&task=form&pathshow=
as WHMCS wants to send data to dologin.php
index.php?option=com_whmcs381&task=form&pathshow=dologin.php
WHMCS is not throwing incorrect user information warning, So I assume that my code is successfully authenticating WHMCS, but it fail to create session(I'm not sure here).
So i checked it with a test.php
<?php
session_start();
foreach ($_SESSION as &$value){
echo $value;
echo '<br />';
}
foreach ($_COOKIE as &$value){
echo $value;
echo '<br />';
}
unset($value);
return "";
?>
When I access test.php directly (http://www.slesolutions.com/xxxxxxxx/components/com_whmcs381/whmcs/)
it gives me no sessions related to WHMCS login.
And through Joomla (index.php?option=com_whmcs381&task=normal&pathshow=test.php) gives me a blank joomla page.
Does anyone have any idea to improve from here.
My knowledge on PHP and Joomla is not good but I keep doing things so feel free to correct me.
Tnx ppl.
U'
nowares
08-08-09, 08:08 PM
Any updates for v4?
hardbrasil
08-12-09, 03:21 PM
already exist an module to Joomla, search in Joomla extensions for whmcs
mysmallbizu
08-12-09, 04:39 PM
http://extensions.joomla.org/extensions/search/whmcs
Shows No Extensions
gohigher
08-13-09, 02:30 PM
http://extensions.joomla.org/extensions/hosting-a-servers/hosting
mysmallbizu
08-13-09, 02:56 PM
not just for WHM
chrismfz
08-20-09, 05:14 PM
Any chance someone write a loginshare with JFusion's API ?
They have done almost all the job, they have an API for creating
new loginshares etc...
So everyone can have Joomla + WHMCS + any other supported
application through JFusion like IPB, phpBB, Magento, vbulletin etc...
JFusion Site (http://www.jfusion.org/)
JFusion Plugin Creation Policy & API (http://www.jfusion.org/index.php/docs/doku.php?id=policy;plugin_creation)
Ala7lam
09-26-09, 08:03 PM
JFusion is an excellent compoent and it would be nice if someone starts a WHMCS fusion and share it with the community!
Hi,
just found this (http://extensions.joomla.org/extensions/hosting-a-servers/hosting/9901) !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!
It seems to be updated, as it is written to be fixed for 4.1 - and users reviews of the dev`s service are great. Will install it and write, how it works.
--- edited: saw that it coast 120$.....
:-P
iPwebGroup
11-07-09, 05:26 PM
Hi,
just found this (http://extensions.joomla.org/extensions/hosting-a-servers/hosting/9901) !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!
It seems to be updated, as it is written to be fixed for 4.1 - and users reviews of the dev`s service are great. Will install it and write, how it works.
--- edited: saw that it coast 120$.....
:-P
any news regarding this integrator?
any news regarding this integrator?
Hi,
I bought it and I think I was one of the first. Steven (the developer) always gave the best to make it really good working now. Little things have to be changed or made better, but all in all 120$ is cheap for such a good support included.
I´m sure Steven will make the ultimate registration tool for WHMCS and Joomla 1.5 - Buy this and you will get what you want. Unbelievable fast updating and fast enhancements of features are guaranteed for this addon. You can see my install here: www.nowdoo.at - realease to production stage soon.
gazfocus
11-29-09, 12:42 PM
Is it really worth $120 though?
I have been looking around and for $25, there are companies that will make my WHMCS site look identical to my Joomla site. I know I wouldn't have the dynamic menus, etc, but $120 does seem a bit steep.
Is it really worth $120 though?
I have been looking around and for $25, there are companies that will make my WHMCS site look identical to my Joomla site. I know I wouldn't have the dynamic menus, etc, but $120 does seem a bit steep.
yes, I don't wanna pay that much. would prefer something cheaper. anything?
dallas147
04-18-10, 09:49 AM
Hi
Just came across this post so thought I would post what I did.. Sorry if I am bumping it up.
If you just want to have the one login, being the WHMS login, try doing below.
1. Go to Module Manager - new - custom HTML
2. add
<form id="frmlogin" action="billing/dologin.php?goto=clientarea" enctype="application/x-www-form-urlencoded" method="post">
<table class="frame" style="margin: 0 auto;" border="0" cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="5" align="center">
<tbody>
<tr>
<td class="fieldarea" width="20" align="right">Email:</td>
<td><input style="width: 102px; height: 22px;" name="username" size="13" type="text" /></td>
</tr>
<tr>
<td class="fieldarea" width="20" align="right">Password:</td>
<td><input style="width: 101px; height: 22px;" name="password" size="14" type="password" /></td>
</tr>
<tr>
<td class="fieldarea" width="20" align="right"><input name="rememberme2" type="checkbox" value="on" /></td>
<td>Remember Me</td>
</tr>
<tr>
<td class="fieldarea" width="20" align="right"> </td>
<td><input type="submit" value="Login" /></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</form>
3. Make sure the 1st line is pointing to your whmcs folder (billing, payments, etc)
4. Press save and your done. :D
Will be great if somebody develop a product for WHMCS and Virtuemart integration!
this is EXTREMELY easy to do. just write a short function to make the following call to the WHMCS API while storing the user's joomla profile info in an array called $DetailArray:
$url = "api.php"; # URL to WHMCS API file
$username = "admin"; # Admin username goes here
$password = "admin"; # Admin password goes here
$postfields["username"] = $username;
$postfields["password"] = md5($password);
$postfields["action"] = "addclient";
$postfields["firstname"] = $Detail_Array[firstname];
$postfields["lastname"] = $Detail_Array[lastname];
$postfields["companyname"] = $Detail_Array[business];
$postfields["email"] = $Detail_Array[email];
$postfields["address1"] = $Detail_Array[address];
$postfields["address2"] = $Detail_Array[address2];
$postfields["city"] = $Detail_Array[city];
$postfields["state"] = $Detail_Array[state];
$postfields["postcode"] = $Detail_Array[postcode];
$postfields["country"] = "AU";
$postfields["phonenumber"] = $Detail_Array[phone];
$postfields["password2"] = $Detail_Array[password];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($ch);
curl_close($ch);
$data = explode(";",$data);
foreach ($data AS $temp) {
$temp = explode("=",$temp);
$results[$temp[0]] = $temp[1];
}
if ($results["result"]=="success") {
# Result was OK!
echo("Success, new client id is ". $results["clientid"]);
} else {
# An error occured
echo "The following error occured: ".$results["message"];
}
then just save the user's $clientID into a field in the joomla user table. You can then submit their username and password to the WHMCS login page using a link on your joomla homepage.
We did the same thing on our website, but we dont use Joomla. its the same deal though.
I've never actually used Joomla, but if it's writen in PHP with MySQL, then you should be able to use this code (mostly borrowed from the WHMCS API documentation) to do what you want to do.
Hi there, where must i put this code? thanks in advance
toddimus
02-14-11, 09:11 PM
Hi there, where must i put this code? thanks in advance
Hey, this thread is pretty old... there's a solution for this now:
https://www.gohigheris.com/our-products/whmcs-autoauth-for-joomla.html
and a much more robust paid solution:
https://www.gohigheris.com/our-products/jwhmcs-integrator.html
the guys there are great...so check it out.
ipwsite
04-12-11, 10:25 AM
this is EXTREMELY easy to do. just write a short function to make the following call to the WHMCS API while storing the user's joomla profile info in an array called $DetailArray:
$url = "api.php"; # URL to WHMCS API file
$username = "admin"; # Admin username goes here
$password = "admin"; # Admin password goes here
$postfields["username"] = $username;
$postfields["password"] = md5($password);
$postfields["action"] = "addclient";
$postfields["firstname"] = $Detail_Array[firstname];
$postfields["lastname"] = $Detail_Array[lastname];
$postfields["companyname"] = $Detail_Array[business];
$postfields["email"] = $Detail_Array[email];
$postfields["address1"] = $Detail_Array[address];
$postfields["address2"] = $Detail_Array[address2];
$postfields["city"] = $Detail_Array[city];
$postfields["state"] = $Detail_Array[state];
$postfields["postcode"] = $Detail_Array[postcode];
$postfields["country"] = "AU";
$postfields["phonenumber"] = $Detail_Array[phone];
$postfields["password2"] = $Detail_Array[password];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($ch);
curl_close($ch);
$data = explode(";",$data);
foreach ($data AS $temp) {
$temp = explode("=",$temp);
$results[$temp[0]] = $temp[1];
}
if ($results["result"]=="success") {
# Result was OK!
echo("Success, new client id is ". $results["clientid"]);
} else {
# An error occured
echo "The following error occured: ".$results["message"];
}
then just save the user's $clientID into a field in the joomla user table. You can then submit their username and password to the WHMCS login page using a link on your joomla homepage.
We did the same thing on our website, but we dont use Joomla. its the same deal though.
I've never actually used Joomla, but if it's writen in PHP with MySQL, then you should be able to use this code (mostly borrowed from the WHMCS API documentation) to do what you want to do.
Could someone tell me where I need to copy these codes?
ipwsite
04-14-11, 08:05 PM
this is EXTREMELY easy to do. just write a short function to make the following call to the WHMCS API while storing the user's joomla profile info in an array called $DetailArray:
$url = "api.php"; # URL to WHMCS API file
$username = "admin"; # Admin username goes here
$password = "admin"; # Admin password goes here
$postfields["username"] = $username;
$postfields["password"] = md5($password);
$postfields["action"] = "addclient";
$postfields["firstname"] = $Detail_Array[firstname];
$postfields["lastname"] = $Detail_Array[lastname];
$postfields["companyname"] = $Detail_Array[business];
$postfields["email"] = $Detail_Array[email];
$postfields["address1"] = $Detail_Array[address];
$postfields["address2"] = $Detail_Array[address2];
$postfields["city"] = $Detail_Array[city];
$postfields["state"] = $Detail_Array[state];
$postfields["postcode"] = $Detail_Array[postcode];
$postfields["country"] = "AU";
$postfields["phonenumber"] = $Detail_Array[phone];
$postfields["password2"] = $Detail_Array[password];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($ch);
curl_close($ch);
$data = explode(";",$data);
foreach ($data AS $temp) {
$temp = explode("=",$temp);
$results[$temp[0]] = $temp[1];
}
if ($results["result"]=="success") {
# Result was OK!
echo("Success, new client id is ". $results["clientid"]);
} else {
# An error occured
echo "The following error occured: ".$results["message"];
}
then just save the user's $clientID into a field in the joomla user table. You can then submit their username and password to the WHMCS login page using a link on your joomla homepage.
We did the same thing on our website, but we dont use Joomla. its the same deal though.
I've never actually used Joomla, but if it's writen in PHP with MySQL, then you should be able to use this code (mostly borrowed from the WHMCS API documentation) to do what you want to do.
where I need to paste this code could you tell me step by step? Thanks in advance
elialum
03-12-13, 12:09 PM
Hi,
We've released a fully working solution for that -
http://www.jetserver.net/whmcs-joomla-bridge
Free & open source.
(I am bumping this old thread for anyone googeling about it and lands here..)
Eli.
sagramor
03-26-13, 02:19 AM
Hi,
We've released a fully working solution for that -
http://www.jetserver.net/whmcs-joomla-bridge
Free & open source.
(I am bumping this old thread for anyone googeling about it and lands here..)
Eli.
Eli with this component i can bring modules from WHMCS to joomla or only Joomla modules to WHMCS?
elialum
03-28-13, 08:31 PM
Hi,
Eli with this component i can bring modules from WHMCS to joomla or only Joomla modules to WHMCS?
Only Joomla modules to WHMCS.
Eli.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.