If you want to add facebook chat to opencart 3 and journal them ( maybe also for all themes)
please go to
catalog/view/theme/journal3/template/common
open header.twig file
add jjust after the <body class=”{{ class }}” {% if j3.document.isMobile() %}ontouchstart{% endif %}>
this :
<!– Load Facebook SDK for JavaScript –>
<div id=”fb-root”></div>
<script>
window.fbAsyncInit = function() {
FB.init({
xfbml : true,
version : ‘v5.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/el_GR/sdk/xfbml.customerchat.js”;
fjs.parentNode.insertBefore(js, fjs);
}(document, ‘script’, ‘facebook-jssdk’));</script>
<div class=”fb-customerchat”
page_id=”pleaseputyourpageid”
logged_in_greeting=”Hi!How can we help;”
logged_out_greeting=”Hi!How can we help;”>
</div>
then go to your FB page and add your domain to the whitelist
- Click Settings at the top of your Page
- Click Advance Messaging on the left
- Edit whitelisted domains for your page in the Whitelisted Domains section
remember to clean opencart and journal cache!