You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.7 KiB
40 lines
1.7 KiB
<?xml version="1.0" encoding="utf-8" ?>
|
|
<odoo>
|
|
<template id="layout" inherit_id="web.frontend_layout">
|
|
<xpath expr="//body" position="inside">
|
|
<t t-if="website.enable_messenger">
|
|
<t t-if="website.fb_id_page">
|
|
<!-- Messenger Chat plugin Code -->
|
|
<div id="fb-root"/>
|
|
<!-- Your Chat plugin code -->
|
|
<div id="fb-customer-chat" class="fb-customerchat">
|
|
</div>
|
|
<script>
|
|
var chatbox =
|
|
document.getElementById('fb-customer-chat');
|
|
chatbox.setAttribute("page_id", "<t
|
|
t-esc="website.fb_id_page"/>");
|
|
chatbox.setAttribute("attribution", "biz_inbox");
|
|
</script>
|
|
<!-- Your SDK code -->
|
|
<script>
|
|
window.fbAsyncInit = function() {
|
|
FB.init({
|
|
xfbml : true,
|
|
version : 'v15.0'
|
|
});
|
|
};
|
|
(function(d, s, id) {
|
|
var js, fjs = d.getElementsByTagName(s)[0];
|
|
if (d.getElementById(id)) return;
|
|
js = d.createElement(s); js.id = id;
|
|
js.src =
|
|
'https://connect.facebook.net/en_US/sdk/xfbml.customerchat.js';
|
|
fjs.parentNode.insertBefore(js, fjs);
|
|
}(document, 'script', 'facebook-jssdk'));
|
|
</script>
|
|
</t>
|
|
</t>
|
|
</xpath>
|
|
</template>
|
|
</odoo>
|
|
|