Zen Cart Logo
Forums / All Other Contributions/Addons / Chatra not working in 1.5.6

Chatra not working in 1.5.6

Views: 1,376

Results 1 to 9 of 9
11 Dec 2020, 11:40 PM
#1
jimmie avatar

jimmie

Totally Zenned

Join Date:
Jan 2013
Location:
New Port Richey, Florida
Posts:
969
Plugin Contributions:
0

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 ```

<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} -->

<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.com/Tools_Equipment/Ceramic_Stone_Tools/Saw_Blades/Montolit_CPF180_7_PERFETTO_Diamond_Blade>
15 Dec 2020, 12:13 AM
#2
jimmie avatar

jimmie

Totally Zenned

Join Date:
Jan 2013
Location:
New Port Richey, Florida
Posts:
969
Plugin Contributions:
0

Re: Chatra not working in 1.5.6

any suggestions?

15 Dec 2020, 1:06 AM
#3
raptar avatar

raptar

New Zenner

Join Date:
Jan 2019
Location:
New Zealand
Posts:
38
Plugin Contributions:
0

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

15 Dec 2020, 4:35 AM
#4
jimmie avatar

jimmie

Totally Zenned

Join Date:
Jan 2013
Location:
New Port Richey, Florida
Posts:
969
Plugin Contributions:
0

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

17 Dec 2020, 8:01 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Chatra not working in 1.5.6

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?

18 Dec 2020, 12:28 PM
#6
jimmie avatar

jimmie

Totally Zenned

Join Date:
Jan 2013
Location:
New Port Richey, Florida
Posts:
969
Plugin Contributions:
0

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

18 Dec 2020, 12:42 PM
#7
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: Chatra not working in 1.5.6

jimmie:

when i put this code .... in its respective place

Where did you try to put the code?

18 Dec 2020, 1:31 PM
#8
jimmie avatar

jimmie

Totally Zenned

Join Date:
Jan 2013
Location:
New Port Richey, Florida
Posts:
969
Plugin Contributions:
0

Re: Chatra not working in 1.5.6

in tools/chatra

18 Dec 2020, 2:00 PM
#9
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: Chatra not working in 1.5.6

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