Blank Sidebox Blank Page after adding code for livechat software
Hey everyone,
i have been trying to figure this out for hour or more and still cant get it... I am trying to add live chat to my zen cart store. I have found that volusion has free chat software that installs quite easily with only a simple copy and paste of code. My problem is when I try to copy and paste that code into the /public_html/includes/languages/english/extra_definitions/CUSTOM/blank_sidebox_defines.php file the whole site goes to blank white screen. The code is below
I have successfully added the code the the main page through the admin define pages editor and the code works as it should. But I would much rather have it in sidebox.
I have also by searching the forums found that it may have something to do with the single ' but I dont know anything about it. I do notice that the code that they supply me has " instead of ' but once I paste it here or into notepad they turn into single '. I hope I havnt confused anyone as bad as I am. But I have tried supplying all the information I have came up with about this situation. let me know if you got any suggestions.
<!-- Begin Volusion Live Chat -->
<div align='center' id='VolusionLiveChat'><a href='http://www.volusion.com'>Ecommerce</a></div>
<script defer type='text/javascript' src='https://livechat.volusion.com/script.aspx?id=996885'></script>
<!-- End Volusion Live Chat -->
Re: Blank Sidebox Blank Page after adding code for livechat software
Inserting stuff like that into a define will always cause problems. Try inserting your code in the proper section of tpl_blank_sidebox_php.
Re: Blank Sidebox Blank Page after adding code for livechat software
Line breaks can cause problems in a Define, as Steve says.
Try running it all onto ONE line:
PHP Code:
<!-- Begin Volusion Live Chat --><div align='center' id='VolusionLiveChat'><a href='http://www.volusion.com'>Ecommerce</a></div><script defer type='text/javascript' src='https://livechat.volusion.com/script.aspx?id=996885'></script><!-- End Volusion Live Chat -->
Re: Blank Sidebox Blank Page after adding code for livechat software
I tried posting the single line code into the tpl_blank_sidebox_php and it makes all the right sideboxes disapear. This is the same as happened when I tried using the original code also.
I also tried adding the code to the blank_sidebox_defines.php and it give me entire white page and thats it.
The only other thing i have found is it may have something to do with using javascript in the sidebox. There seems to be a few threads about javascript errors in sidebox but I am not knowledgeable at any type if coding at all.
I hope to get this figured out as I haven't found any free live chat addons for zen cart.
Re: Blank Sidebox Blank Page after adding code for livechat software
I know my solution works (we use this appropach for SSL sideboxes), so you are making some other error.
What PROGRAM are you using to edit your PHP files?
Re: Blank Sidebox Blank Page after adding code for livechat software
You might search the Free Software Add Ons for chat.
Re: Blank Sidebox Blank Page after adding code for livechat software
Your problem is two-fold:
1. The CODE provided contains single quotes, so you need to ESCAPE these before you put them in a PHP file:
PHP Code:
$content .= '<!-- Begin Volusion Live Chat --><div align=\'center\' id=\'VolusionLiveChat\'><a href=\'http://www.volusion.com\'>Ecommerce</a></div><script defer type=\'text/javascript\' src=\'https://livechat.volusion.com/script.aspx?id=996885\'></script><!-- End Volusion Live Chat -->';
2. I tried your code quickly in one of our sideboxes, and while I get the links to show, and the popup appears, I get a 404 in the popup, suggesting that the system ONLY works if you use Volution as a system for your eCommerce.
Re: Blank Sidebox Blank Page after adding code for livechat software
ZenCart 1.5
I am having the same problem I use "Provide Support" for my chat system. I Installed "Blank Sidebox" but my page also whet blank and uninstalled it.
but now I am not sure how to install my chat. are there any sideboxes that I can rename and use insted of installing a new one?
My code below.
<div id="cipaRJ" style="z-index:100;position:absolute"></div><div id="scpaRJ" style="display:inline"></div><div id="sdpaRJ" style="display:none"></div><script type="text/javascript">var sepaRJ=document.createElement("script");sepaRJ.type="text/javascript";var sepaRJs=(location.protocol.indexOf("https")==0?"https":"http")+"://image.providesupport.com/js/044om8xvvaoyz0kxv90uh925iw/safe-standard.js?ps_h=paRJ&ps_t="+new Date().getTime();setTimeout("sepaRJ.src=sepaRJs;document.getElementById('sdpaRJ' ).appendChild(sepaRJ)",1)</script><noscript><div style="display:inline"><a href="http://www.providesupport.com?messenger=044om8xvvaoyz0kxv90uh925iw">Live Help Desk</a></div></noscript>
Again thank you and sorry for so many questions.
Re: Blank Sidebox Blank Page after adding code for livechat software
You have single quotes in that bit of script:
<div id="cipaRJ" style="z-index:100;position:absolute"></div><div id="scpaRJ" style="display:inline"></div><div id="sdpaRJ" style="display:none"></div><script type="text/javascript">var sepaRJ=document.createElement("script");sepaRJ.type="text/javascript";var sepaRJs=(location.protocol.indexOf("https")==0?"https":"http")+"://image.providesupport.com/js/044om8xvvaoyz0kxv90uh925iw/safe-standard.js?ps_h=paRJ&ps_t="+new Date().getTime();setTimeout("sepaRJ.src=sepaRJs;document.getElementById('sdpaRJ' ).appendChild(sepaRJ)",1)</script><noscript><div style="display:inline"><a href="http://www.providesupport.com?messenger=044om8xvvaoyz0kxv90uh925iw">Live Help Desk</a></div></noscript>
Try this, and load to your new blank sidebox and try again.
\'sdpaRJ\'