X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Automatic Kayako SupportWorks / eSupport Login (https://forum.x-cart.com/showthread.php?t=19645)

craigbrass 02-01-2006 12:00 AM

Automatic Kayako SupportWorks / eSupport Login
 
Hello,

Having seen how AWBS automatically logs you into Kayako when you click the "Support System" link, I thought "Why couldn't X-Cart have such an intergration". So, I developed one. To intergrate it, do the following :-

1. Install Kayako SupportWorks / eSupport.
2. Setup the LoginShare correctly by entering the database details and also setting the main template group to use the X-Cart login routine.
3. Open up ./auth.php inside your X-Cart installation and enter the following code at the VERY bottom just before the "?>" :-
Code:

// ------------------------------------------------------
// ---------------- Kayako Passover ---------------------
// ------------------------------------------------------

$kayako_URL = ""; // This should be the full URL to your Kayako installtion including index.php. For example http://www.itselixir.com/helpdesk/index.php

$kayako_passover_user_data = func_query_first("SELECT * FROM $sql_tbl[customers] WHERE login='$login' AND usertype='C' AND status='Y'");

$kayako_passover_user_password = text_decrypt($kayako_passover_user_data["password"]);

$smarty->assign("kayako_passover_user_password", $kayako_passover_user_password);
$smarty->assign("kayako_URL", $kayako_URL);

// ------------------------------------------------------
// --------------- End Kayako Passover ------------------
// ------------------------------------------------------


4. Set the $kayako_URL in the above code.
5. Open ./skin1/authbox.tpl and enter the following code just after "{capture name=menu}" at the top of the file :-
Code:

{*** Kayako Passover **}
<form method="post" action="{$kayako_URL}" name="kayako_login" target="_blank">
                <input type="hidden" name="loginemail" value="{$login}">
                <input type="hidden" name="loginpassword" value="{$kayako_passover_user_password}">
                <input type="hidden" name="_m" value="core">
                <input type="hidden" name="_a" value="login">
</form>
<TABLE border="0" cellpadding="5" cellspacing="0" width="100%">
<FORM action="{$xcart_web_dir}/include/login.php" method="post" name="loginform">
{*** End Kayako Passover **}


6. Still in auth.tpl, find "{$lng.lbl_orders_history}
" and just below add :-
Code:

{*** Kayako Passover **}
Support System


{*** End Kayako Passover **}


Anyway, enjoy! If you have any problems, just post them below and I will try to help you out.

Best Regards,
Craig Brass

craigbrass 02-01-2006 12:12 AM

Oh, forgot to mention, if you want it to open in a new window when a user clicks "Support System", leave it as it is. If you want it to open in the same window, remove " target="_blank"" from the <form> in step 5.

Jon 02-01-2006 12:17 AM

Hi Craig, interesting bumping into you in a thread here after meeting in the thread to request x-cart integration on the Kayako forums ;)

I integrated my support suite with my x-cart to use the same login and password, but found it annoying that a user logged into x-cart, would have to re-enter their login/pass to access Kayako, as a result I created a script to auto-log them in.

In my Kayako support directory I put this in an .htaccess file:

Code:

DirectoryIndex home.php index.php

This allows home.php to be called prior to the kayako index.

Then in home.php I entered the following which checks for a logged in x-cart user, and if they are logged into x-cart, it will create a login form for kayako and auto-submit it using javascript, logging them automatically into kayako.

It works very similar to yours, just a bit of another integration option.

NOTE: You'll have to edit the path to skin1.css and I'd put a logo on the page or something also.

Code:

<?php

require "../auth.php";

if ($login) {

        $pass = func_query_first("SELECT password FROM $sql_tbl[customers] WHERE login='$login' LIMIT 1");
        $pass = $pass[password];
        $pass = text_decrypt($pass);

?>

        <HTML><title>Logging into Client Support Center</title>
        <link rel="stylesheet" href="/skin1/skin1.css">

        <BODY onLoad="document.loginform.submit();">

        <form name="loginform" action="index.php" method="POST">
        <input type="hidden" name="loginemail" value="<?= $login; ?>">
        <input type="hidden" name="loginpassword" value="<?= $pass; ?>"></td>
        <input type="hidden" name="rememberme" value="1">
        <input type="hidden" name="_m" value="core">
        <input type="hidden" name="_a" value="login">
        <input type="hidden" name="querystring" value="">

        <table width="100%" height="100%" ><tr><td align="center" valign="middle">
        <div align=center>
        <table cellpadding=15 cellspacing=0 width=500 bgcolor="#FFFFFF"><tr><td>
       

<font face="arial" size="3">Client Support Center</font></p>
       

<font face="arial" size="2">Please wait while we log you into the Client Support Center...</font></p>
       
<p align=center><input type="submit" class="form" value="Click here if you're not automatically logged in"></p>
        </td></tr></table>
        </div>
        </td></tr></table>
        </form></body></html>

<?
}
else {
        header("Location: index.php");
}

?>


craigbrass 02-01-2006 12:32 AM

Hi John,

Either way works really but I like to avoid messing around with .htaccess files tbh, had nothing but problems with them! :evil:

Best Regards,
Craig Brass

junaid 03-07-2006 12:23 AM

Hi Craig,
i tried to do what you had mentioned but couldnt find xcart module in Template > login share section.

do i need to do with oscommerce module , please help.
regards
Junaid

cotc2001 03-07-2006 10:24 AM

Been looking at kayako today and it certainly looks impressive.
Im a little confused on which package i need to buy though as the esupport package seems to do just the ticketing but the supportsuite seems to do the whole shebang with livechat etc.

The supportsuite looks like what i would want BUT it makes no mention of the intergration modules with it.

Jon 03-07-2006 10:27 AM

The integration modules come with the ticket system and the ticket system comes with support suite :)

cotc2001 03-07-2006 10:38 AM

Cool looks like i'll be buying that tomorrow then :D

It will be nice to have some structure on customer requests etc. - at the moment its me and a notepad to remind me to email someone when a new product comes in.

Jon 03-07-2006 10:47 AM

It has been an absolute life saver for me. I was hesitant at first because I didn't know how much it would help, but now I couldn't picture business without it.

Jon 03-07-2006 10:47 AM

Also we have some setup/installation FAQ's on our site that may help you as their documentation is severely lacking.

cotc2001 03-07-2006 12:19 PM

can you give a direct link to the faqs you have on it, i couldn't find them

NightFire 03-07-2006 12:41 PM

Just looked at you support suite. Very impressive indeed.
Here is the link to the knowledgebase / FAQ which is on the website of websiteCM.

http://www.websitecm.com/support/index.php?_m=knowledgebase&_a=view

Also heard that some guys are releasing OSTicket V2.0 soon. Less futures then Kayako, but OSTicket is free.
So if you only need the standard features osticket will do fine I guess.

Jon 03-07-2006 12:54 PM

http://www.websitecm.com/customer/search.php?substring=kayako

2019 09-04-2006 11:38 PM

Re: Automatic Kayako SupportWorks / eSupport Login
 
Dear friends,
i try to integrate kayako 3.0.32 with x-cart 4.1.3
i have followed the tutor at your site.
but the kayako always prompt invalid user. :(
if you can help me i will be very appriciated. =)
keep up the good work!
thank you..

Onur Caki



this is the x-cart.login.share.php
i can not paste the holy code!
The text that you have entered is too long (24382 characters). Please shorten it to 10000 characters long.
come on! i hate the new forum version

gallica 10-11-2006 11:05 AM

Re: Automatic Kayako SupportWorks / eSupport Login
 
To continue the thread of Craig,
I'm wrong if i can't find in auth.tpl $lng.lbl_orders_history} ?
Jon, thanks for the quick help on setup the product. Usefull.
Any advice ?

Warwick 11-07-2006 02:20 AM

Re: Automatic Kayako SupportWorks / eSupport Login
 
Is there somebody who got this working with Kayako 3.00.90 and X-Cart 4.1.3?

I've tried the intial post with instructions but this returns an errror:

Fatal error: Call to undefined function: text_decrypt() in /home/mydomain/public_html/shop/auth.php on line 225

And I also can't find 'auth.tpl $lng.lbl_orders_history' in my 4.1.3 auth.tpl file

lixy 11-07-2006 07:14 AM

Re: Automatic Kayako SupportWorks / eSupport Login
 
I am also trying to get this working under 4.1.3 but have not had any success thus far. Has anyone gotten LoginShare working with 4.1.3 and if so please outline the steps taken.

CTC 05-02-2009 11:13 PM

Re: Automatic Kayako SupportWorks / eSupport Login
 
Can anyone confirm that the current 4.2.1 and Kayako SupportSuite v3.50.06 work hand in hand if you implement that log in share thing.

Christofer 05-05-2009 01:57 PM

Re: Automatic Kayako SupportWorks / eSupport Login
 
Quote:

Originally Posted by CTC
Can anyone confirm that the current 4.2.1 and Kayako SupportSuite v3.50.06 work hand in hand if you implement that log in share thing.


i wonder that too. i am search for a good ticket system and i didn't found anything else except kayako, so i wonder if the login share will work with the first post of this thread.. anyway, i believe that it wont work, coz the first post made on 2006

ITVV 08-04-2009 06:16 AM

Re: Automatic Kayako SupportWorks / eSupport Login
 
Quote:

Originally Posted by lixy
I am also trying to get this working under 4.1.3 but have not had any success thus far. Has anyone gotten LoginShare working with 4.1.3 and if so please outline the steps taken.


Hi, did you ever get this auto-login for Kayako working with x-cart?

Both sets of instructions are indeed old now.

I have tried both and get the "PHP Fatal error: Call to undefined function text_decrypt()" error.

Would appreciate any help or advice.

Many thanks as always

Nick

ambal 01-28-2010 05:36 AM

Re: Automatic Kayako SupportWorks / eSupport Login
 
Hi Everyone,

Vote for Kayako&X-Cart integration at Ideas

If you really need this integration.

Alex

Dongan 02-02-2010 07:18 PM

Re: Automatic Kayako SupportWorks / eSupport Login
 
Quote:

Originally Posted by ambal
Hi Everyone,

Vote for Kayako&X-Cart integration at
http://ideas.x-cart.com/forums/32109...hare?ref=title

If you really need this integration.

Alex


Broken link/page not found

ambal 02-02-2010 10:53 PM

Re: Automatic Kayako SupportWorks / eSupport Login
 
Dongan, thank you! I didn't notice that the submit form corrupted the link. I updated it in the original post + repeat it here:

Vote for Kayako/X-Cart integration here.

You are welcome to leave your comments and more ideas there!


All times are GMT -8. The time now is 02:12 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.