Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions

You are not logged in.

Announcement

#1 2016-01-07 03:19:37

jimmy
Member
Registered: 2015-11-26
Posts: 26

Different language redirect to different department

hi, remdex

i'm looking for solution how to do choose different language will redirect send pending chat to different department to accept

Example

IF    Applicant SELECT chinese = send chat to department A

ELSE Applicant SELECT other = send chat to department B


how can i modify my embed code ?

Offline

#2 2016-01-07 06:00:34

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Different language redirect to different department

Hi,

Most logical way is just prefill department in embed code generation window. So in your site you will have just slightly different embed codes.

Offline

#3 2016-01-07 06:03:06

jimmy
Member
Registered: 2015-11-26
Posts: 26

Re: Different language redirect to different department

examples ?

Offline

#4 2016-01-07 06:22:09

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Different language redirect to different department

See, in this embed code all chat request would be automatically assigned to department 1

/(department)/1
[== JavaScript ==]
<script type="text/javascript">
var LHCChatOptions = {};
LHCChatOptions.opt = {widget_height:340,widget_width:300,popup_height:520,popup_width:500};
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
var referrer = (document.referrer) ? encodeURIComponent(document.referrer.substr(document.referrer.indexOf('://')+1)) : '';
var location  = (document.location) ? encodeURIComponent(window.location.href.substring(window.location.protocol.length)) : '';
po.src = '//demo.livehelperchat.com/chat/getstatus/(click)/internal/(position)/bottom_right/(ma)/br/(top)/350/(units)/pixels/(leaveamessage)/true/(department)/1?r='+referrer+'&l='+location;
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>

Offline

#5 2016-01-07 06:28:26

jimmy
Member
Registered: 2015-11-26
Posts: 26

Re: Different language redirect to different department

remdex wrote:

See, in this embed code all chat request would be automatically assigned to department 1

/(department)/1
[== JavaScript ==]
<script type="text/javascript">
var LHCChatOptions = {};
LHCChatOptions.opt = {widget_height:340,widget_width:300,popup_height:520,popup_width:500};
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
var referrer = (document.referrer) ? encodeURIComponent(document.referrer.substr(document.referrer.indexOf('://')+1)) : '';
var location  = (document.location) ? encodeURIComponent(window.location.href.substring(window.location.protocol.length)) : '';
po.src = '//demo.livehelperchat.com/chat/getstatus/(click)/internal/(position)/bottom_right/(ma)/br/(top)/350/(units)/pixels/(leaveamessage)/true/(department)/1?r='+referrer+'&l='+location;
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>

But if i wanna let my live chat assign like this can work ?

english live chat to department 2
/livehelperchat/index.php/chat/getstatusembed/(department)/2';

chinese live chat to department 1
/livehelperchat/index.php/chn/chat/getstatusembed/(department)/1';

Offline

#6 2016-01-07 06:29:09

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Different language redirect to different department

Yes it will work.

Offline

#7 2016-01-07 06:36:27

jimmy
Member
Registered: 2015-11-26
Posts: 26

Re: Different language redirect to different department

remdex wrote:

Yes it will work.


<!-- Place this tag where you want the Live Helper Plugin to render. -->
<div id="lhc_status_container_page" ></div>

<!-- Place this tag after the Live Helper Plugin tag. -->
<script type="text/javascript">
var LHCChatOptionsPage = {};
LHCChatOptionsPage.opt = {};
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = '//demo.livehelperchat.com/livehelperchat/index.php/chn/chat/getstatusembed/(department)/1';
po.src = '//demo.livehelperchat.com/livehelperchat/index.php/chat/getstatusembed/(department)/2';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>

can I modify the embed code as above ?

Offline

#8 2016-01-07 10:23:53

PeopleInside
Administrator
From: Italy
Registered: 2014-04-10
Posts: 4,046
Website

Re: Different language redirect to different department

Hi Kimmy,
thank you for posting in the forum.

Please consider remdex is very busy,
I think you can test by yourself if work or not and if something is wrong than you can ask again in the forum.
Thank you for understanding!


lol PeopleInside - Live helper chat - free limited forum support!
wink For commercial support or GitHub [see FAQ here]
ops If you want to support this open source project, just donate [see support page]
glasses Something wrong with the forum? [contact a superhero]

Offline

#9 2016-01-08 18:29:02

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Different language redirect to different department

No you can't have code like this. You have dynamically adjust you embed code by page. It's not LHC job to do that.

Offline

Board footer