Chatra not working in 1.5.6
i installed this module Chatra https://www.zen-cart.com/downloads.php?do=file&id=2034, when i put this code
Code:
<script>
window.ChatraSetup = {
colors: {
buttonText: '#f0f0f0', /* chat button text color */
buttonBg: '#3499da' /* chat button background color */
}
};
</script>
<!-- Chatra {literal} -->
<script>
(function(d, w, c) {
w.ChatraID = 'yfz2dwnFxZgz3CTwk';
var s = d.createElement('script');
w[c] = w[c] || function() {
(w[c].q = w[c].q || []).push(arguments);
};
s.async = true;
s.src = 'https://call.chatra.io/chatra.js';
if (d.head) d.head.appendChild(s);
})(document, window, 'Chatra');
</script>
<!-- /Chatra {/literal} -->
in its respective place. i get this on bottom of screen
Code:
<script> window.ChatraSetup = { colors: { buttonText: '#f0f0f0', /* chat button text color */ buttonBg: '#3499da' /* chat button background color */ } }; </script> <!-- Chatra {literal} --> <script> (function(d, w, c) { w.ChatraID = 'yfz2dwnFxZgz3CTwk'; var s = d.createElement('script'); w[c] = w[c] || function() { (w[c].q = w[c].q || []).push(arguments); }; s.async = true; s.src = 'https://call.chatra.io/chatra.js'; if (d.head) d.head.appendChild(s); })(document, window, 'Chatra'); </script> <!-- /Chatra {/literal} -->
i ended up putting the code in tpl.main, it works but shows on every page. this did work in 1.51
here is a product page https://www.jnsflooringandsupplies.c..._Diamond_Blade
Re: Chatra not working in 1.5.6
Re: Chatra not working in 1.5.6
Hi Jimmie,
When you look at the page source, your script tags appear to have been sanitized. Instead of showing < it displays < or > >
So what should be <script> is showing as <script>
Regards raptar
Re: Chatra not working in 1.5.6
yes i know its suppose to the chat button like it is doing with the code hard coded in tpl main. but instead just shows source
Re: Chatra not working in 1.5.6
Quote:
Originally Posted by
jimmie
i ended up putting the code in tpl.main, it works but shows on every page.
So ... you put it into tpl_main_page and it works.
What's the issue with it showing on every page? Is there certain logic around which specific pages you want it on, instead of every page?
Re: Chatra not working in 1.5.6
cause i think it slows site down. when i go to site, i see it saying waiting for chatra
Re: Chatra not working in 1.5.6
Quote:
Originally Posted by
jimmie
when i put this code .... in its respective place
Where did you try to put the code?
Re: Chatra not working in 1.5.6
Re: Chatra not working in 1.5.6
Quote:
Originally Posted by
jimmie
in tools/chatra
Oh I see, I'm not familiar with the mod, didn't realise it had a custom location. I thought perhaps you were trying to add the code to a specific Zen Cart page e.g. Contact Us