Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions
You are not logged in.
I added the javascript array to our embedded code and the data is coming over from the website to the information tab of the online visitor, however instead of the format shown in the documentation, I'm actually just getting back the entire array, like:
{
"email": "",
"userid": "0",
"username": "",
"0": "undefined",
"Array": "undefined",
"each": "undefined",
"1": "undefined",
"clean": "undefined",
"invoke": "undefined",
"associate": "undefined",
"link": "undefined",
"contains": "undefined",
"append": "undefined",
"getLast": "undefined",
"getRandom": "undefined",
"include": "undefined",
"combine": "undefined",
"erase": "undefined",
"empty": "undefined",
"flatten": "undefined",
"pick": "undefined",
"hexToRgb": "undefined",
"rgbToHex": "undefined",
"min": "undefined",
"max": "undefined",
"average": "undefined",
"sum": "undefined",
"unique": "undefined",
"shuffle": "undefined",
"rgbToHsb": "undefined",
"hsbToRgb": "undefined"
}
Note our custom fields are username, email, and userid. but this is how it is displayed under the Additional Information.
Did I do something wrong or is there a problem in the administrative template side of things?
This is our JS code on the website...
[== JavaScript ==]
<script type="text/javascript">
var lhc_username = document.getElementById('lhc_username').value;
var lhc_userid = document.getElementById('lhc_userid').value;
var lhc_useremail = document.getElementById('lhc_useremail').value;
var LHCChatOptions = {};
LHCChatOptions.opt = {
widget_height: 340,
widget_width: 300,
popup_height: 520,
popup_width: 500
};
var LHCChatOptionsPage = {};
LHCChatOptionsPage.opt = {};
LHCChatOptionsPage.attr = new Array();
LHCChatOptionsPage.attr.push({
'name': 'UserId',
'value': lhc_userid,
'type': 'text',
'size': 6,
'show': 'on'
});
LHCChatOptionsPage.attr.push({
'name': 'email',
'value': lhc_useremail,
'type': 'text',
'size': 60
});
LHCChatOptionsPage.attr.push({
'name': 'Bet ID 2',
'value': 'bet_id 2',
'type': 'hidden',
'size': 0
});
LHCChatOptionsPage.attr.push({
'name': 'Transaction ID 2',
'value': '',
'type': 'text',
'size': 12,
'show': 'on'
});
LHCChatOptionsPage.attr_prefill = new Array();
LHCChatOptionsPage.attr_prefill.push({
'name': 'email',
'value': lhc_useremail,
'hidden': true
});
LHCChatOptionsPage.attr_prefill.push({
'name': 'name',
'value': lhc_username
});
LHCChatOptionsPage.attr_prefill.push({
'name': 'username',
'value': lhc_username
});
(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 = '//livehelp-server.xxx/index.php/chat/getstatus/(click)/internal/(position)/bottom_right/(ma)/br/(check_operator_messages)/true/(top)/350/(units)/pixels/(leaveamessage)/true/(department)/0/1/2/3/(theme)/2?r=' + referrer + '&l=' + location;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(po, s);
})();
</script>
Thanks for any hints/direction.
Offline
Hi,
thank you for your question but this is too technical for basic support.
You can try to ask on the GitHub page, link on my forum signature.
Have a great time !
Last edited by PeopleInside (2017-10-04 16:41:48)
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