Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions
You are not logged in.
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
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
examples ?
Offline
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
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
Yes it will work.
Offline
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
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!
PeopleInside - Live helper chat - free limited forum support!
For commercial support or GitHub [see FAQ here]
If you want to support this open source project, just donate [see support page]
Something wrong with the forum? [contact a superhero]
Offline
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