Hi,
I'm having zen cart 1.3.8a, I'm installing Crafty Syntax Live help.
- http://www.mydomain.com/livehelp (using setup)
version 2.14.6
http://www.mydomain.com/livehelp/login.php is working fine.
- sidebox module was installed accordingly at
languages/
modules/
templates/
with only minor changes to tpl_craftysyntax_sidebox.php
- I reviewed tpl_craftysyntax_sidebox.php
PHP Code:
$cs_flag = "true";
// Directory where Crafty Syntax Live Help is installed
$cs_dir = "http://www.mydomain.com/livehelp";
// Department that you will be monitoring.
$cs_dept = "3";
// Pingtimes as set in Crafty Syntax.
$cs_pingtimes = "15";
if ($cs_flag){
// If passing username then query the database to collect first and last name
global $db;
if (isset($_SESSION['customer_id']) && $_SESSION['customer_id']) {
$cs_customer_id = $_SESSION['customer_id'];
$customer_query = "select customers_firstname, customers_lastname, customers_email_address
from " . TABLE_CUSTOMERS . "
where customers_id = '" . (int)$_SESSION['customer_id'] . "'";
$customer = $db->Execute($customer_query);
$cs_full_name = $customer->fields['customers_firstname'] . ' ' . $customer->fields['customers_lastname'];
// Future version - trying to pass zencart customer email address to CSLH.
//$cs_email = $customer->fields['customers_email_address'];
}else{
$cs_customer_id = '';
$cs_full_name = 'Guest';
// Future version - trying to pass zencart customer email address to CSLH.
//$cs_email = '';
}
// Build Link to Crafty Syntax here which includes the full customer name.
$cs_link = $cs_dir . '/' . 'livehelp_js.php?department=' . $cs_dept . '&pingtimes=' . $cs_pingtimes . '&username=' . $cs_full_name;
}else{
// Build Link to Crafty Syntax here - no customer name.
$cs_link = $cs_dir . '/' . 'livehelp_js.php?department=' . $cs_dept . '&pingtimes=' . $cs_pingtimes;
}
$content = "";
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">';
$content .= '<script type="text/javascript" src="' . $cs_link . '"></script>';
$content .= '</div>';
?>
I even tested with
$cs_dir = "livehelp";
But the sidebox images did not appear at the front website.
so, I decided to test it by inserting the "test" word in $content.
PHP Code:
$content = "test";
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">';
$content .= '<script type="text/javascript" src="' . $cs_link . '"></script>';
$content .= '</div>';
I only get:
- the title of the Live Help
- the word test
there is no offline/online images loaded. I verified, and the images are there in http:\\www.mydomain.com\livehelp\images
the javascript in the $content doesn't seems to execute properly
I view the page source, the url to livehelp_js.php looks ok.
Code:
<div class="box-indent">
<div class="box1_body">
test<div id="craftysyntaxsideboxContent" class="sideBoxContent centeredContent"><script type="text/javascript" src="http://www.mydomain.com/livehelp/livehelp_js.php?department=3&pingtimes=15&username=Guest"></script></div> </div>
I really don't know what is wrong here.
Can anyone of you who has similar issue, help me out here ?
Thanks.
Regards,
Sky
Bookmarks