Live Helper Chat support forum.. Old google groups forum can be found here

You are not logged in.

Announcement

#1 2020-02-17 23:06:52

bayanaask
Member
Registered: 2019-01-03
Posts: 44

How can I check department's OPERATOR is online or not

Hello,

Right now my livechathelper works fine. But I want to change some rules. For example: I am showing departments based on customer country. It works fine. But i want to change this rule.

First I want to check all the departments and if Ukraine is not available i want to show Russia or others. But how can I check department's operator is online or not?. I hope there is a easy way to check department's operator status using URL right?.

if(country == 'Ukraine'){
                                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 = '//domain.com/livechat/index.php/chat/getstatus/(click)/internal/(position)/bottom_right/(ma)/br/(top)/350/(units)/pixels/(leaveamessage)/true/(department)/9/(theme)/5?r=' + referrer + '&l=' + location;
                                    var s = document.getElementsByTagName('script')[0];
                                    s.parentNode.insertBefore(po, s);
                                })();
}else (country == 'Russia'){
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 = '//domain.com/livechat/index.php/chat/getstatus/(click)/internal/(position)/bottom_right/(ma)/br/(top)/350/(units)/pixels/(leaveamessage)/true/(department)/10/(theme)/5?r=' + referrer + '&l=' + location;
                                    var s = document.getElementsByTagName('script')[0];
                                    s.parentNode.insertBefore(po, s);
}

Offline

#2 2020-02-18 09:18:32

PeopleInside
Administrator
From: Italy
Registered: 2014-04-10
Posts: 3,641
Website

Re: How can I check department's OPERATOR is online or not

Hi bayanaask,
thank you for your request. I'm sorry to inform i cannot help with this as is not basic support.
If you want you can find more info on my forum signature, commercial support.


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

Board footer