Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions
You are not logged in.
Pages: 1
Hi, how can i prefill data on the new widget?
i try using the old method but it doesnt work.
on the old widget i use LHCChatOptions.attr_prefill.push({'name':'username','value':'<?= $user->username ?>'}); but on the new one i cant find the way to do the same thing.
Thanks.
Offline
Hi, welcome on the Live Helper Chat Forum.
Please see if this article helps: https://doc.livehelperchat.com/docs/cus … -variables
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, yes, i read that but i dont know how to use it on the new one.
on this one is easy:
<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 = '//10.69.76.49//soporte/index.php/chat/getstatus/(click)/internal/(position)/bottom_right/(ma)/br/(top)/350/(units)/pixels/(leaveamessage)/true?r='+referrer+'&l='+location;
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
but on this one
<script>var LHC_API = LHC_API||{};
LHC_API.args = {mode:'widget',lhc_base_url:'//10.69.76.49//soporte/index.php/',wheight:450,wwidth:350,pheight:520,pwidth:500,leaveamessage:true,check_messages:false};
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.setAttribute('crossorigin','anonymous'); po.async = true;
var date = new Date();po.src = '//10.69.76.49//soporte/design/defaulttheme/js/widgetv2/index.js?'+(""+date.getFullYear() + date.getMonth() + date.getDate());
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
i dont understando how to do it.
i can pass the data as an aditional chat variable, but the data is not presented fine, because the list of online users show me the data the same way.
thanks
Offline
For that I cannot help, you would need try to wait here for a developer reply.
The developer can be more busy than me, if you still have no answer you can follow links on my signature and maybe try to ask on discord.
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
Pages: 1