Jump to content
Latest News: (loading..)

Munchies

Members
  • Content count

    11
  • Joined

  • Last visited

  1. STEP 1: Install Crafty Syntax Livehelp from: http://craftysyntax.com/installation.php#stable Step 2: Upload Files Upload these two files to your OSC 2.3.1 catalog, then just enter your admin, and click "install" under Modules -> Boxes: :D :D /includes/boxes/bm_livehelp.php <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2010 osCommerce Released under the GNU General Public License */ class bm_livehelp { var $code = 'bm_livehelp'; var $group = 'boxes'; var $title; var $description; var $sort_order; var $enabled = false; function bm_livehelp() { $this->title = MODULE_BOXES_LIVEHELP_TITLE; $this->description = MODULE_BOXES_LIVEHELP_DESCRIPTION; if ( defined('MODULE_BOXES_LIVEHELP_STATUS') ) { $this->sort_order = MODULE_BOXES_LIVEHELP_SORT_ORDER; $this->enabled = (MODULE_BOXES_LIVEHELP_STATUS == 'True'); $this->group = ((MODULE_BOXES_LIVEHELP_CONTENT_PLACEMENT == 'Left Column') ? 'boxes_column_left' : 'boxes_column_right'); } } function execute() { global $customer_id, $languages_id, $PHP_SELF, $oscTemplate; //Check if the have a name if (tep_session_is_registered('customer_id')) { $customer_query = tep_db_query("select customers_firstname, customers_lastname from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'"); $customer = tep_db_fetch_array($customer_query); $wo_full_name = $customer['customers_firstname'] . ' ' . $customer['customers_lastname']; $data = '<div class="ui-widget infoBoxContainer">' . ' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_LIVEHELP_BOX_TITLE . '</div>' . ' <div class="ui-widget-content infoBoxContents">' . ' <script language="javascript" src="/livehelp/livehelp_js.php?relative=Y&pingtimes=15&username=' . $wo_full_name . '"></script><br />' . BOX_LIVEHELP_TEXT . '<br />' . ' </div>' . '</div>'; } else { $data = '<div class="ui-widget infoBoxContainer">' . ' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_LIVEHELP_BOX_TITLE . '</div>' . ' <div class="ui-widget-content infoBoxContents">' . '<script language="javascript" src="/livehelp/livehelp_js.php?relative=Y&pingtimes=15"></script><br/>' . BOX_LIVEHELP_TEXT . '<br />' . ' </div>' . '</div>'; } $oscTemplate->addBlock($data, $this->group); } function isEnabled() { return $this->enabled; } function check() { return defined('MODULE_BOXES_LIVEHELP_STATUS'); } function install() { tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable LiveHelp Module', 'MODULE_BOXES_LIVEHELP_STATUS', 'True', 'Do you want to add the module to your shop?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Placement', 'MODULE_BOXES_LIVEHELP_CONTENT_PLACEMENT', 'Left Column', 'Should the module be loaded in the left or right column?', '6', '1', 'tep_cfg_select_option(array(\'Left Column\', \'Right Column\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_BOXES_LIVEHELP_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_BOXES_LIVEHELP_STATUS', 'MODULE_BOXES_LIVEHELP_CONTENT_PLACEMENT', 'MODULE_BOXES_LIVEHELP_SORT_ORDER'); } } ?> /includes/languages/english/modules/boxes/bm_livehelp.php :D :D <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2010 osCommerce Released under the GNU General Public License */ define('MODULE_BOXES_LIVEHELP_TITLE', 'Live Help'); define('MODULE_BOXES_LIVEHELP_DESCRIPTION', 'Crafty Syntax Live Help'); define('MODULE_BOXES_LIVEHELP_BOX_TITLE', 'Live Help: Sunday-Thursday'); // livehelp box text in includes/boxes/livehelp.php define('BOX_LIVEHELP_TEXT','Available 11am-11pm EST'); ?>
  2. Munchies

    Supertracker Development

    For United States and United Kingdom shop owners, I posted an upgrade to v3.4 to use the GeoCityLite.dat and track visitor region and city based on their IP address. http://addons.oscommerce.com/info/3924
  3. Does anyone here already have a way to get supertracker to ignore all of the bad MSNbot ips? I'm using the following but some of the ips do not resolve back correctly so I've stopped half the msnbots from being recorded. The following I have added to the end of the exclude bots section of classes/supertracker.php: $host_name = gethostbyaddr($ip_address); if(preg_match("/search\.msn\.com$/", $host_name) || preg_match("/search\.live\.com$/", $host_name)){ //the hostname does belong to either search.msn.com or search.live.com. //Remember the User Agent did not say it was a Bot. //So it's a misbehaving spider. $record_session = false; } Any help would be much appreciated.
  4. Munchies

    Quantity Price Breaks

    All other functions of this mod seem to work without a glitch... so I just do not understand why the discount_categories.php show_products fails.
  5. Munchies

    Quantity Price Breaks

    Nope. Still does the same thing, either I really need to change the query string or this is a bug in my PHP Version 4.4.7
  6. Munchies

    Quantity Price Breaks

    Okay, I'm gonna try re-applying my changes and see if it goes away... Update: still working on it.
  7. Munchies

    Quantity Price Breaks

    The mod seemed to work okay otherwise ONLY the show products button in the admin seems affected. I added a product to sell in blocks of 6. with 5 levels of volume discounts. It worked great showed all the correct info in product listings (I loved the "from $1.80" thing, too cool) and the buy now forced "6" to be entered instead of "1". But, I reverted all the changed files back to before the addition. I have copies of all the files I uploaded to my already modified site, so I can just push them back up later. I double checked all the merged files, no problem that I could see. So what did I miss on the database side that could cause the query to become ambiguous?
  8. Munchies

    Quantity Price Breaks

    Installed QPBPP v1_3_6 in the admin when I click the show products button I get this message: 1052 - Column 'products_id' in from clause is ambiguous select count(*) as total from products p, products_description pd left join products_to_discount_categories ptdc using(products_id) where p.products_id = pd.products_id and pd.language_id = '1' and ptdc.discount_categories_id = '1' There is only two lines in (discount_categories.php) that I can find that contain the text. Assigned to a raw query string. So should I change it to read using(p.products_id) or is that circular logic?
  9. I've downloaded the latest but I need the following function added to check if email exists: Thanks for any suggestions on how or where I add in inside your mod. /** Validate an email address. Provide email address (raw input) Returns true if the email address has the email address format and the domain exists. */ function validEmail($email) { $isValid = true; $atIndex = strrpos($email, "@"); if (is_bool($atIndex) && !$atIndex) { $isValid = false; } else { $domain = substr($email, $atIndex+1); $local = substr($email, 0, $atIndex); $localLen = strlen($local); $domainLen = strlen($domain); if ($localLen < 1 || $localLen > 64) { // local part length exceeded $isValid = false; } else if ($domainLen < 1 || $domainLen > 255) { // domain part length exceeded $isValid = false; } else if ($local[0] == '.' || $local[$localLen-1] == '.') { // local part starts or ends with '.' $isValid = false; } else if (preg_match('/\\.\\./', $local)) { // local part has two consecutive dots $isValid = false; } else if (!preg_match('/^[A-Za-z0-9\\-\\.]+$/', $domain)) { // character not valid in domain part $isValid = false; } else if (preg_match('/\\.\\./', $domain)) { // domain part has two consecutive dots $isValid = false; } else if (!preg_match('/^(\\\\.|[A-Za-z0-9!#%&`_=\\/$\'*+?^{}|~.-])+$/',str_replace("\\\\","",$local))) { // character not valid in local part unless // local part is quoted if (!preg_match('/^"(\\\\"|[^"])+"$/',str_replace("\\\\","",$local))) { $isValid = false; } } if ($isValid && !(checkdnsrr($domain,"MX"))) { // domain has no mail server $isValid = false; } } return $isValid; }
  10. Installed PWA 2.1b: When someone would click checkout and slide there mouse over the table image, the alt text of "Account Information" was being shown. Not a big problem, but confusing people into thinking they were creating an account. instructions for create_account.php should be updated to read: ***FIND: <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_account.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> ****Replace with: // PWA BOF if (!isset($HTTP_GET_VARS['guest']) && !isset($HTTP_POST_VARS['guest'])){ ?> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td><td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_account.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> <?php }else{ ?> <td class="pageHeading"><?php echo HEADING_TITLE_PWA; ?></td><td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_account.gif', HEADING_TITLE_PWA, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> <?php } // PWA EOF This also allows for a Guest account image to be displayed; just change the second 'table_background_account.gif' to 'table_background_account_PWA.gif' after you upload a new image, named 'table_background_account_PWA.gif'. Will be back when I get the download without account working (DWA 1.0beta)
  11. OSC is checking customer_id but with PWA no customer_id is set. (Email address works is an alternative) Look in download.php after: // Check that order_id, customer_id and filename match,
×