Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions
You are not logged in.
Pages: 1
Hi Remi ,I want to dig deeper into the actions after closing chats , for instance I want to redirect the user to another page , for example to fill a survey ,right after the operator closes the chat. Are you aware of which instance to invoke to accomplish this?Greetings .
Offline
Hi,
Good question. In general two options there.
1. Is you customer closing page widget?
2. Is your customer is closing popup?
These two requires completely different approaches.
So which one is your case?
Offline
Well , im thinking that the operator closes a customer chat (in my scenario the customer can not reopen chat.), after that I want to redirect the customer to a survey. More likely the customer contacted the chat through the embedded widget.
Also , Its worth mentioning .. Im having a hard time calling the customstatus extension after enabling it on the settings.. Im calling an API on the close_chat to see if im reaching that extension .. and well no .. the code is not reaching there.
Offline
Sorry Remi ,
Never mind the second part . The API didnt work because of network issues on my server .
Offline
Hi,
I ques if widget will be embeded in page. The easiest way
a. is just override this template https://github.com/LiveHelperChat/livehelperchat/blob/master/lhc_web/design/defaulttheme/tpl/lhchat/getstatus.tpl.php
b. Or just have custom JS in site itself which attaches event to https://github.com/LiveHelperChat/livehelperchat/blob/master/lhc_web/design/defaulttheme/tpl/lhchat/getstatus.tpl.php#L366 to element with id lhc_close
c. In atacched function you can just directly redirect user to some page, or you can also try to use http://livehelperchat.com/chats-export-module-tutorial-177a.html to get chat status before redirecting user. Or just write your own module
Offline
So this is what I did to redirect a customer to a surver when operator closes chat. I located the file lh.js
Added an else condition to if (data.blocked != 'true')
var evaluate= confirm("Would you like to evaluate the operator?"); if (evalua==true){ $('#status-chat').html(data.status); $('#ChatMessageContainer').remove(); $('#ChatSendButtonContainer').remove(); top.window.location = 'http://mywbsitesurvey?idChat=' + this.hash; }else{ $('#status-chat').html(data.status); $('#ChatMessageContainer').remove(); $('#ChatSendButtonContainer').remove();}
Overriding this template https://github.com/LiveHelperChat/livehelperchat/blob/master/lhc_web/design/defaulttheme/tpl/lhchat/getstatus.tpl.php is usefull when customer closes chat from widget.
Hope this is usefull and thanks for your help.
Offline
I am trying to catch the event when user closes the widget chat so I can display a text.
In the ......./design/defaulttheme/tpl/lhchat/getstatus.tpl.php i found:
document.getElementById('lhc_close').onclick = function() { lhc_obj.hide(); return false; };
-and-
} else if (action == 'lhc_close') {
lh_inst.hide();
}
modifying both makes no difference to the chat window. Even if I remove those lines, the close button still works.
Help?
Offline
Most likely you did not clear a cache. Please create a new topic next time.
https://livehelperchat.com/article/view/58
https://livehelperchat.com/how-to-use-d … -291a.html
Offline
Pages: 1