Kayako integration - Create new CS-Cart account and send email

I’m trying to integrate Kayako with CS-Cart (two separate sub-domains, same server) but I’m still learning PHP so I don’t know the language very well.



Kayako automatically creates a new account for non-members when they send an email to the Kayako help desk, start a chat session or when they create a ticket. I’m using Kayako’s LoginShare so Kayako first checks the CS-Cart database to see if a user is already registered in CS-Cart with that email address, then checks the Kayako database.



I want to add some code to Kayako that will also create a CS-Cart account for the user if one does not already exist. I first thought of using fsock or cURL to post to the CS-Cart registration page when Kayako creates the new Kayako account but I have captcha enabled for CS-Cart so that would be very difficult to overcome.



Now I’m thinking the only way to do this is to have Kayako insert the email address, password, salt, first name, last name and account type directly into the CS-Cart database.



The only other thing is to have CS-Cart send the new user/confirmation email to the user and CS-Cart admin once the account is created.



Can someone help me with the database insertion code?



How can I trigger that email to be sent?



Thanks,



Jeff :grin:

If I recall correctly there was Kayako code posted a few months back, possibly last year.

The original poster provided the V3 code, assuming you can modify that?



J.

[quote name=‘JesseLeeStringer’ timestamp=‘1344542026’ post=‘142560’]

If I recall correctly there was Kayako code posted a few months back, possibly last year.

The original poster provided the V3 code, assuming you can modify that?



J.

[/quote]



Thanks for the reply but I could not find it. When I search the entire CS-Cart forum and use “kayako” as the search word, only one page of results is returned but none of those threads are related to my query :-(

[quote name=‘JesseLeeStringer’ timestamp=‘1344609811’ post=‘142625’]

http://forum.cs-cart…__fromsearch__1

[/quote]

Thanks JesseLee but that is for a simple loginshare script so it does not create a CS-Cart account as I tried to describe in my original post :-)



Actually, I already updated that script and I am using it.



I posted the update here:

http://forum.cs-cart…post__p__142553.



Thanks anyway.