View Single Post
  #1  
Old 02-01-2006, 12:00 AM
 
craigbrass craigbrass is offline
 

Advanced Member
  
Join Date: May 2005
Location: Cumbria, UK
Posts: 80
 

Default 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
__________________
Its Elixir - www.itselixir.com
Product: X-Cart Gold
Version: 4.0.17
Status: Live

Its Elixir Wholesale - www.itselixirwholesale.com
Product: X-Cart Gold
Version: 4.0.17
Status: In Development

Real Champagne - www.realchampagne.com
Product: X-Cart Gold
Version: 4.0.17
Status: In Development
Reply With Quote