Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions
You are not logged in.
I am using lh_openchatWindow() to open a new chat window via a link in my page.
I have a number of different departments and I would like to differentiate each department at open of the chat window.
Is this possible or do I need to have multiple instances for each department link in my list?
Offline
Hi,
thank you for your post.
You want have different link in your website, each one open a different department?
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
Yes, I have three links on my page and I would like to open a chat window that is related to the department associated to that link.
Currently the chat script is loaded dynamically and the department number is part of that initial load.
Since the design change to have all the departments on a single list I can no longer use that approach.
So I think I would need something more like
<a onclick="return lh_inst.lh_openchatWindow(1)" href="#">Chat with a CSR</a><br>
where 1 = the customer service department.
Offline
Aww I think to be unable to help you with this kind of request. This need maybe a reply from the chat programmer.
The documentation are available at https://livehelperchat.com/documentation-6c.html
The Forum is the right place where receive free support BUT as the chat owner are busy, he can't reply to topics here, usually... in the last month, for that reason I AM looking at the issues posted in the Forum but not always I AM able to help.
Maybe you will be able with some works and test to do what you want. If you are able to find the solution can be useful share here maybe for other users.
Sorry to be unable to help you with that request,
have a very great time!
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
Just as an FYI this is how I accomplished what I needed
the html file
<script>
function chat(dept){
var host = window.location.hostname;
if (host === 'localhost') {
host = "dev2.com";
}
var url = '//' + host + '/livechat/lhc/index.php/eng/chat/startchat/(leaveamessage)/true/(theme)/1/(department)/' + dept;
return lh_inst.showStartWindow(url,false);
}
</script>
<div class="help-panel" ng-class="{active: vm.showHelp}">
<span class="help-panel__close" ng-click="vm.toggleHelp()">
<span class="u-hide-in-mobile-and-tablet">Close</span> <i class="icon-cancel-large"></i>
</span>
<div class="col-group mobile--full tablet-and-above--1-3 tablet-and-above--ruled">
<div class="col">
<h5>General Questions</h5>
<p>
<span ng-if="vm.showChat"><a onclick="return chat(1)" href="#">Chat with a CSR</a><br></span>
Mon–Thu 7am–8pm<br>
Fri 7am–4pm<br>
Sat–Sun 7am–2pm<br>
All times are PST
</p>
</div><!-- /.col -->
<div class="col">
<h5>Special Interest</h5>
<p>
<span ng-if="vm.showChat"><a onclick="return chat(2)" href="#">Chat with a Specialist</a><br></span>
Mon–Thu 7:00am–8:00pm<br>
Fri 7:00am–4:00pm<br>
Sat–Sun 7:00am–2:00pm PT
</p>
</div><!-- /.col -->
<div class="col">
<h5>Advisors</h5>
<p>
<span ng-if="vm.showChat"><a onclick="return chat(9)" href="#">Chat with a Advisor</a><br></span>
Mon–Thu 7am–5pm<br>
Fri 7am–4pm
</p>
</div>
</div>
</div>
Angular loaded js file. pretty sure not all of this is needed but I may make this a generic file at some point:
var appEnum = Object.freeze({
B : 1,
M : 2,
W : 9
});
var LHCChatOptions = {};
var host = window.location.hostname;
if (host === 'localhost') {
host = "dev2.com";
}
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)) : '';
var protocol = window.location.protocol === 'https:' ? window.location.protocol : 'https:';
var app = appEnum[window.location.pathname.substring(1,window.location.pathname.lastIndexOf('/')).toUpperCase()];
po.src = protocol + '//' + host + '/livechat/lhc/index.php/chat/getstatus/(click)/internal/(leaveamessage)/true/(department)/' + app + '/(theme)/1?r=' + referrer + '&l=' + location;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(po, s);
})();
Last edited by peekay21 (2016-05-13 20:24:33)
Offline
Hi,
is now your issue fixed?
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
yes it is. the application is doing what I want it to.
Offline
I AM happy to hear that, great
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
Hi peekay21, does this opens multiple chat window? i tried above code but it opens same window again and again.
My requirement is like google char where one user can chat with multiple guys from one page. is this doable?
"index.php/site_admin/chat/chattabs/#/panel2" chattabs can work for me but looks like its only for admin user.
thanks
Offline
Hi narendra.kothule,
live chat is one thing, chatbox is another thing.
Chat box is like a public chat box where every one can write a message.
If you want other operator to be able to join in already opened private chat from other operator you have just to assign the right permission.
You can read here:
How to disable operators open already accepted chats from their departments?
If your operator are not able to join you can add the permission showed in this guide page.
If you want visitor to join in a group visitor chat than use chatbox, will be a public chat for all.
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
Thanks for reply PeopleInside! sorry i guess it didn't help me.
my scenario is -
- All are logged in user.
Project1 team has developers P1D1, P1D2
Project2 team has developers P2D1, P2D2, P2D3
and
ITsupport team has sub-team like
Linux team has member L1M1. L1M2
Windows team has member W1M1, W1M2
and we want to implement chat such way so that
P1D1 can chat with L1M1 also same time P1D1 can chat with L1M2 or W1M1 or W1M2
similarly P2D1 can chat with L1M1 also same time P2D1 can chat with L1M2 or W1M1 or W1M2
can this be doable? if yes how group, department, role & permission should be created to achieve this?
Thank you!
Offline
It won't work. Multiple customers chats on same page.
Sorry I do not know how to help about this. You can consider the commercial support.
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