tawkto bring customer data
This commit is contained in:
parent
53aa187d1f
commit
8086802bf6
@ -852,5 +852,6 @@
|
||||
"info": "info",
|
||||
"Registration_code": "Registration code",
|
||||
"Admin_can_only_have_single_session_login__it_will_logout_another_session": "Admin can only have single session login, it will logout another session",
|
||||
"Single_session_Admin": "Single session Admin"
|
||||
"Single_session_Admin": "Single session Admin",
|
||||
"Get_Directions": "Get Directions"
|
||||
}
|
@ -56,22 +56,48 @@
|
||||
{if $_c['tawkto'] != ''}
|
||||
<!--Start of Tawk.to Script-->
|
||||
<script type="text/javascript">
|
||||
var Tawk_API = Tawk_API || {},
|
||||
Tawk_LoadStart = new Date();
|
||||
var isLoggedIn = false;
|
||||
var Tawk_API = {
|
||||
onLoad: function() {
|
||||
if (!isLoggedIn) {
|
||||
isLoggedIn = true;
|
||||
window.Tawk_API.login({
|
||||
name: '{$_user['fullname']}',
|
||||
email: '{$_user['email']}',
|
||||
userId: '{$_user['id']}'
|
||||
}, function(error) {
|
||||
//do something if there's an error
|
||||
});
|
||||
}
|
||||
Tawk_API.setAttributes({
|
||||
'id' : '{$_user['id']}',
|
||||
'username' : '{$_user['username']}',
|
||||
'service_type' : '{$_user['service_type']}',
|
||||
'balance' : '{$_user['balance']}',
|
||||
'account_type' : '{$_user['account_type']}',
|
||||
'phone' : '{$_user['phonenumber']}'
|
||||
}, function(error) {});
|
||||
}
|
||||
};
|
||||
var Tawk_LoadStart = new Date();Tawk_API.visitor = {
|
||||
name : '{$_user['fullname']}',
|
||||
email : '{$_user['email']}',
|
||||
userId: '{$_user['id']}'
|
||||
};
|
||||
(function() {
|
||||
var s1 = document.createElement("script"),
|
||||
s0 = document.getElementsByTagName("script")[0];
|
||||
s1.async = true;
|
||||
s1.src='https://embed.tawk.to/{$_c['tawkto']}';
|
||||
s1.src = 'https://embed.tawk.to/{$_c['tawkto']}';
|
||||
s1.charset = 'UTF-8';
|
||||
s1.setAttribute('crossorigin', '*');
|
||||
s0.parentNode.insertBefore(s1, s0);
|
||||
})();
|
||||
</script>
|
||||
<!--End of Tawk.to Script-->
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
<script>
|
||||
<script>
|
||||
const toggleIcon = document.getElementById('toggleIcon');
|
||||
const body = document.body;
|
||||
const savedMode = localStorage.getItem('mode');
|
||||
@ -99,9 +125,10 @@
|
||||
localStorage.setItem('mode', 'dark');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
||||
{literal}
|
||||
|
||||
{literal}
|
||||
<script>
|
||||
var listAtts = document.querySelectorAll(`[api-get-text]`);
|
||||
listAtts.forEach(function(el) {
|
||||
@ -159,10 +186,12 @@
|
||||
}
|
||||
return null;
|
||||
}
|
||||
setCookie('user_language', '{/literal}{$user_language}{literal}', 365);
|
||||
setCookie('user_language', '
|
||||
{/literal}{$user_language}
|
||||
{literal}', 365);
|
||||
</script>
|
||||
{/literal}
|
||||
{/literal}
|
||||
|
||||
</body>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
Loading…
x
Reference in New Issue
Block a user