RE: Live Customer Support Module v 2.2 and Query failed?

TB <[email protected]> 12 Sep 2003 22:53:46 -0000
Newsgroups gmane.comp.web.oscommerce.installation
Message-ID <da858280e518d65aa3e40c51f8a281e4@osCommerce-Forums>
This message was sent from: Installation and Configuration
http://forums.oscommerce.com/viewtopic.php?p=228638#228638
----------------------------------------------------------------

Basically, all you need to do is install the module as per the install instructions in the download.
Since we're in this forum and not the LiveHelp one, I'll focus mainly on getting the code to work osCommerce.

Once it's installed and working on it's own.

Edit catalog/includes/column_left.php (or right, depending on your preference) and insert the following code where your would like your box to appear.  In the example below the LiveHelp box will appear between the 'Search' and 'Information' boxes.
[code]  require(DIR_WS_BOXES . 'search.php');
/* Live Help - BOF */
  if ((CTBN_LIVE_HELP == 'true') && (CTBN_LIVE_HELP_HIDDEN == 'true')) {
     ?><!-- Powered by: Crafty Syntax Live Help (CSLH) http://www.craftysyntax.com/livehelp/ --><script language="javascript" src="http://webdev/lh/livehelp_js.php?cmd=hidden&department=1"></script><!-- copyright 2003 by Eric Gerdes --><?php
  } elseif (CTBN_LIVE_HELP == 'true') {
     require(DIR_WS_BOXES . 'live_help.php');
  }
/* Live Help - EOF */
  require(DIR_WS_BOXES . 'information.php');[/code]

Next, create a file called 'live_help.php' in your catalog/includes/boxes/' folder.
and insert the following code into that file.
[code]<?php
/*
  $Id: livehelp.php,v 1.0 2002/10/10 16:23:58 Patrick Veverka

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2002 Patrick Veverka

  Released under the GNU General Public License
*/
?>
<!-- livehelp_box_bof //-->
          <tr>
            <td>
<?php
  $info_box_contents = array();
  $info_box_contents[] = array('align' => 'left',
                               'text'  => 'Live Help'
                              );
  new infoBoxHeading($info_box_contents, false, false);

  $info_box_contents = array(); 
if (getenv('HTTPS') == "on") {
  $info_box_contents[] = array('align' => 'center', 
                                'text' => '<!-- Powered by: Crafty Syntax Live Help (CSLH) http://www.craftysyntax.com/livehelp/ --><script language="javascript" src="'. HTTPS_SERVER .'/livehelp/livehelp_js.php?department=1"></script><!-- copyright 2003 by Eric Gerdes -->');
} else {
  $info_box_contents[] = array('align' => 'center', 
                                'text' => '<!-- Powered by: Crafty Syntax Live Help (CSLH) http://www.craftysyntax.com/livehelp/ --><script language="javascript" src="'. HTTP_SERVER .'/livehelp/livehelp_js.php?department=1"></script><!-- copyright 2003 by Eric Gerdes -->');
}

  new infoBox($info_box_contents);
  
?>
            </td>
          </tr>
<!-- livehelp_box_eof //-->[/code]

Next, go to phpMyAdmin and insert the following SQL statement.
This statement will give you a new option in your Admin >> Configuration menu, called 'Contributions'.  Inside there, you will have sub-headings and be able to turn the contribution on/off and hidden/shown via toggle switches. (This 'Contributions' options will provide a path for future contributions to have toggles on/off and settings for else should each contribution need them.)
[code]INSERT INTO `configuration_group` VALUES (100, 'Contributions', 'Contribution Options', 100, 1);
INSERT INTO `configuration` VALUES ('', '<b>System Configuration - Admin</b>', '', '', '', 100, 0, '2003-06-18 22:58:18', '2003-06-12 12:35:51', NULL, '');    
INSERT INTO `configuration` VALUES ('', '<b>System Configuration</b>', '', '', '', 100, 40, '2003-06-18 22:58:18', '2003-06-12 12:35:51', NULL, '');
INSERT INTO `configuration` VALUES ('', '<b>Client Communication</b>', '', '', '', 100, 80, '2003-06-18 22:58:18', '2003-06-12 12:35:51', NULL, '');
INSERT INTO `configuration` VALUES ('', '<b>Layout - Design</b>', '', '', '', 100, 100, '2003-06-18 22:58:18', '2003-06-12 12:35:51', NULL, '');
INSERT INTO `configuration` VALUES ('', '<b>Layout - Boxes</b>', '', '', '', 100, 140, '2003-06-18 22:58:18', '2003-06-12 12:35:51', NULL, '');
INSERT INTO `configuration` VALUES ('', 'Live Help', 'CTBN_LIVE_HELP', 'true', 'Would you like activate the Live Help feature?', 100, 86, '2003-08-31 20:05:35', '2003-03-14 12:20:07', NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO `configuration` VALUES ('', 'Live Help - Hidden', 'CTBN_LIVE_HELP_HIDDEN', 'false', 'Would you like activate the hidden Live Help feature?', 100, 87, '2003-08-31 20:29:57', '2003-03-14 12:20:07', NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');[/code]

There you have it... you should now have a 'LiveHelp' box in your store.

All the best,
Tony