Hickman.io Posted October 11, 2019 Share Posted October 11, 2019 I'm trying to acquire logged in client's variables so it will propagate the client's data. I've implemented the live chat and it is working fine, but it won't identify any of the variables? Any suggestions?? (function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',w.intercomSettings);}else{var d=document;var i=function(){i.c(arguments);};i.q=[];i.c=function(args){i.q.push(args);};w.Intercom=i;var l=function(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://widget.intercom.io/widget/mlfxfdcw';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);};if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})(); window.intercomSettings = { app_id: "mlfxfdcw", name: "{$LANG.clientareafirstname}", // Full name email: "{supportticketsclientemail}", // Email address created_at: "<?php echo strtotime($current_user->created_at) ?>" // Signup date as a Unix timestamp }; (function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',w.intercomSettings);}else{var d=document;var i=function(){i.c(arguments);};i.q=[];i.c=function(args){i.q.push(args);};w.Intercom=i;var l=function(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://widget.intercom.io/widget/mlfxfdcw';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);};if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})(); 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 12, 2019 Share Posted October 12, 2019 if the user is logged in (and hence a client), you might be able to use {$clientsdetails.fullname} for their full name and {$clientsdetails.email} for their email address - though I don't know for sure if it would work. 0 Quote Link to comment Share on other sites More sharing options...
Hickman.io Posted October 12, 2019 Author Share Posted October 12, 2019 4 hours ago, brian! said: if the user is logged in (and hence a client), you might be able to use {$clientsdetails.fullname} for their full name and {$clientsdetails.email} for their email address - though I don't know for sure if it would work. Ok, just to make sure, will I have to find some way for it to reference the SMARTY variables? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 12, 2019 Share Posted October 12, 2019 2 minutes ago, Hickman.io said: Ok, just to make sure, will I have to find some way for it to reference the SMARTY variables? I assumed you already had - as your example code is referencing Smarty variables... well it's referencing two Language Strings (which will be no good for your purpose)... you might need to use <literal>, but which Live Chat addon are you using ?? 0 Quote Link to comment Share on other sites More sharing options...
Hickman.io Posted October 12, 2019 Author Share Posted October 12, 2019 I am integrating Intercom. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 12, 2019 Share Posted October 12, 2019 6 minutes ago, Hickman.io said: I am integrating Intercom. i'm not familiar with that one - I see there's a monthly cost... have you taken a look at tawk.to ? that chat addon is free and i've seen a lot of WHMCS installs using it. 0 Quote Link to comment Share on other sites More sharing options...
Hickman.io Posted October 12, 2019 Author Share Posted October 12, 2019 Just now, brian! said: i'm not familiar with that one - I see there's a monthly cost... have you taken a look at tawk.to ? that chat addon is free and i've seen a lot of WHMCS installs using it. Yes there is a monthly cost, but the automation the chat provides is definitely worth it. Also, it has a lot of apps that integrate into the chat that are great! 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.