Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

TB

Archived
  • Posts

    585
  • Joined

  • Last visited

Everything posted by TB

  1. G'day all! It's been a while since I've mucked around with the osCommerce code, though I've had my SecurePay module working for a while now. Here's a copy of my includes\modules\payment\securepay.php file. Please let me know how you go with it. I'm pretty busy lately, so if it works I might not be able to upload it. If it does work, can someone please add it to the package and re-submit it to the existing contribution. Hope this helps... Tony Note: I have the "Unallowed Payment" module installed. The few lines of code referring to shouldn't cause any problems, though if you find it does or you just don't want it in there for whatever reason, comment out line 25. Also note that I've commented out line 164 as the currency conversion aspect was causing problems for me when I was installing the module. The module works fine, though only processes AUD. Cards from other countries can still be processed fine, since the issue isn't with processing overseas cards, it's to do with other than AUD pricing on your site. <?php /* $Id: esec/securepay.php,v 1.2 2003/12/24 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ class securepay { var $code, $title, $description, $enabled, $states; // class constructor function securepay() { global $order; $this->code = 'securepay'; $this->title = MODULE_PAYMENT_SECUREPAY_TEXT_TITLE; $this->description = MODULE_PAYMENT_SECUREPAY_TEXT_DESCRIPTION; $this->sort_order = MODULE_PAYMENT_SECUREPAY_SORT_ORDER; /* Unallowed Payment - BOF */ if (tep_get_payment_unallowed($this->code)) /* Unallowed Payment - EOF */ $this->enabled = ((MODULE_PAYMENT_SECUREPAY_STATUS == 'True') ? true : false); if ((int)MODULE_PAYMENT_SECUREPAY_ORDER_STATUS_ID > 0) { $this->order_status = MODULE_PAYMENT_SECUREPAY_ORDER_STATUS_ID; } if (is_object($order)) $this->update_status(); $this->form_action_url = ((MODULE_PAYMENT_SECUREPAY_TESTMODE == 'Test') ? 'http://test.securepay.com.au/securepay/payments/process2.asp' : 'https://www.securepay.com.au/securepay/payments/process2.asp'); } // class methods function update_status() { global $order; if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_SECUREPAY_ZONE > 0) ) { $check_flag = false; $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_SECUREPAY_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id"); while ($check = tep_db_fetch_array($check_query)) { if ($check['zone_id'] < 1) { $check_flag = true; break; } elseif ($check['zone_id'] == $order->billing['zone_id']) { $check_flag = true; break; } } if ($check_flag == false) { $this->enabled = false; } } } function javascript_validation() { $js = ' if (payment_value == "' . $this->code . '") {' . "\n" . ' var cc_owner = document.checkout_payment.securepay_cc_owner.value;' . "\n" . ' var cc_number = document.checkout_payment.securepay_cc_number.value;' . "\n" . ' if (cc_owner == "" || cc_owner.length < ' . CC_OWNER_MIN_LENGTH . ') {' . "\n" . ' error_message = error_message + "' . MODULE_PAYMENT_SECUREPAY_TEXT_JS_CC_OWNER . '";' . "\n" . ' error = 1;' . "\n" . ' }' . "\n" . ' if (cc_number == "" || cc_number.length < ' . CC_NUMBER_MIN_LENGTH . ') {' . "\n" . ' error_message = error_message + "' . MODULE_PAYMENT_SECUREPAY_TEXT_JS_CC_NUMBER . '";' . "\n" . ' error = 1;' . "\n" . ' }' . "\n" . ' }' . "\n"; return $js; } function selection() { global $order; for ($i=1; $i<13; $i++) { $expires_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%B',mktime(0,0,0,$i,1,2000))); } $today = getdate(); for ($i=$today['year']; $i < $today['year']+10; $i++) { $expires_year[] = array('id' => strftime('%y',mktime(0,0,0,1,1,$i)), 'text' => strftime('%Y',mktime(0,0,0,1,1,$i))); } $selection = array('id' => $this->code, 'module' => $this->title, 'fields' => array(array('title' => MODULE_PAYMENT_SECUREPAY_TEXT_CREDIT_CARD_OWNER, 'field' => tep_draw_input_field('securepay_cc_owner', $order->billing['firstname'] . ' ' . $order->billing['lastname'])), array('title' => MODULE_PAYMENT_SECUREPAY_TEXT_CREDIT_CARD_NUMBER, 'field' => tep_draw_input_field('securepay_cc_number')), array('title' => MODULE_PAYMENT_SECUREPAY_TEXT_CREDIT_CARD_CVV, 'field' => tep_draw_input_field('securepay_cvv', '', 'size=3 maxlength=3')), array('title' => MODULE_PAYMENT_SECUREPAY_TEXT_CREDIT_CARD_EXPIRES, 'field' => tep_draw_pull_down_menu('securepay_cc_expires_month', $expires_month) . ' ' . tep_draw_pull_down_menu('securepay_cc_expires_year', $expires_year)))); return $selection; } function pre_confirmation_check() { global $HTTP_POST_VARS; include(DIR_WS_CLASSES . 'cc_validation.php'); $cc_validation = new cc_validation(); $result = $cc_validation->validate($HTTP_POST_VARS['securepay_cc_number'], $HTTP_POST_VARS['securepay_cc_expires_month'], $HTTP_POST_VARS['securepay_cc_expires_year']); $error = ''; switch ($result) { case -1: $error = sprintf(TEXT_CCVAL_ERROR_UNKNOWN_CARD, substr($cc_validation->cc_number, 0, 4)); break; case -2: case -3: case -4: $error = TEXT_CCVAL_ERROR_INVALID_DATE; break; case false: $error = TEXT_CCVAL_ERROR_INVALID_NUMBER; break; } if ( ($result == false) || ($result < 1) ) { $payment_error_return = 'payment_error=' . $this->code . '&error=' . urlencode($error) . '&securepay_cc_owner=' . urlencode($HTTP_POST_VARS['securepay_cc_owner']) . '&securepay_cc_type=' . urlencode($HTTP_POST_VARS['securepay_cc_type']) . '&securepay_cc_expires_month=' . $HTTP_POST_VARS['securepay_cc_expires_month'] . '&securepay_cc_expires_year=' . $HTTP_POST_VARS['securepay_cc_expires_year']; tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, $payment_error_return, 'SSL', true, false)); } $this->cc_card_owner = $HTTP_POST_VARS['securepay_cc_owner']; $this->cc_card_number = $cc_validation->cc_number; $this->cc_expiry_month = $cc_validation->cc_expiry_month; $this->cc_expiry_year = $cc_validation->cc_expiry_year; $this->cc_cvv = $HTTP_POST_VARS['securepay_cvv']; } function confirmation() { global $HTTP_POST_VARS; $confirmation = array('title' => $this->title, 'fields' => array(array('title' => MODULE_PAYMENT_SECUREPAY_TEXT_CREDIT_CARD_OWNER, 'field' => $HTTP_POST_VARS['securepay_cc_owner']), array('title' => MODULE_PAYMENT_SECUREPAY_TEXT_TYPE, 'field' => $HTTP_POST_VARS['securepay_cc_type']), array('title' => MODULE_PAYMENT_SECUREPAY_TEXT_CREDIT_CARD_NUMBER, 'field' => substr($this->cc_card_number, 0, 4) . str_repeat('X', (strlen($this->cc_card_number) - 8)) . substr($this->cc_card_number, -4)), array('title' => MODULE_PAYMENT_SECUREPAY_TEXT_CREDIT_CARD_EXPIRES, 'field' => strftime('%B, %Y', mktime(0,0,0,$HTTP_POST_VARS['securepay_cc_expires_month'], 1, '20' . $HTTP_POST_VARS['securepay_cc_expires_year']))), array('title' => MODULE_PAYMENT_SECUREPAY_TEXT_CREDIT_CARD_CVV, 'field' => $HTTP_POST_VARS['securepay_cvv']))); return $confirmation; } function process_button() { global $HTTP_SERVER_VARS, $order, $customer_id; $process_button_string = tep_draw_hidden_field('merchantid', MODULE_PAYMENT_SECUREPAY_MERCHANT_ID) . tep_draw_hidden_field('amount', number_format(($order->info['total']*100), 0, '', '')) . // tep_draw_hidden_field('amount', number_format((($order->info['total'] * $currencies->currencies['AUD']['value'])*100), 0, '', '')) . tep_draw_hidden_field('ponum', STORE_NAME . date('Ymdhis')) . tep_draw_hidden_field('creditCard1', $this->cc_card_number) . tep_draw_hidden_field('exdate1', $this->cc_expiry_month) . tep_draw_hidden_field('cvvno', $this->cc_cvv) . tep_draw_hidden_field('exdate2', substr($this->cc_expiry_year, -2)) . tep_draw_hidden_field('success_page', tep_href_link(FILENAME_CHECKOUT_PROCESS, tep_session_name() . "=" . tep_session_id() . '&ponum=', 'SSL', false)) . tep_draw_hidden_field('failure_page', tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error=' . $this->code . '&' . tep_session_name() . "=" . tep_session_id() . '&ponum=', 'SSL', false)); $process_button_string .= tep_draw_hidden_field(tep_session_name(), tep_session_id()); return $process_button_string; } function before_process() { return false; } function after_process() { return false; } function get_error() { global $HTTP_GET_VARS; $msg = ""; if (stripslashes(urldecode($HTTP_GET_VARS['response_text'])) != "") $msg = stripslashes(urldecode($HTTP_GET_VARS['response_text'])); else if (stripslashes(urldecode($HTTP_GET_VARS['error'])) != "") $msg = stripslashes(urldecode($HTTP_GET_VARS['error'])); $error = array('title' => MODULE_PAYMENT_SECUREPAY_TEXT_ERROR, 'error' => $msg); return $error; } function check() { if (!isset($this->_check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_SECUREPAY_STATUS'"); $this->_check = tep_db_num_rows($check_query); } return $this->_check; } 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 SecurePay/ESEC Module', 'MODULE_PAYMENT_SECUREPAY_STATUS', 'True', 'Do you want to accept SecurePay/ESEC payments?', '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, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_SECUREPAY_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '2', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Merchant ID', 'MODULE_PAYMENT_SECUREPAY_MERCHANT_ID', 'sec0001', 'The merchant id used for the SecurePay service', '6', '0', 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 ('Transaction Mode', 'MODULE_PAYMENT_SECUREPAY_TESTMODE', 'Test', 'Transaction mode used for processing orders', '6', '0', 'tep_cfg_select_option(array(\'Test\', \'Production\'), ', 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 of display.', 'MODULE_PAYMENT_SECUREPAY_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_SECUREPAY_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '0', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_PAYMENT_SECUREPAY_STATUS', 'MODULE_PAYMENT_SECUREPAY_ZONE', 'MODULE_PAYMENT_SECUREPAY_MERCHANT_ID', 'MODULE_PAYMENT_SECUREPAY_TESTMODE', 'MODULE_PAYMENT_SECUREPAY_SORT_ORDER', 'MODULE_PAYMENT_SECUREPAY_ORDER_STATUS_ID'); } } ?>
  2. Found the answer. There are two test cards numbers 4242424242424242 or 4444333322221111 with any expiry date. (You need to take into account that osCommerce does expiy date validations so it will need to be in the future to be accepted by osCommerce, though any date will go through eSec / SecurePay.) If you would like an 'Approved' response, pass a total amount ending with either 00 or 08. If you would like a 'Denied' response, pass through any other amount... i.e. 01 or 02. To make this clearer. If you pass through a total shopping cart amount of $108.08, you will get an accepted response as it ends with 08. So on and so forth. You may want to make shipping charges nil for ease of testing as you will only need to focus on setting the product price. I've tested the above with the modifications posted by Steve and it works great. Hope this helps, Tony
  3. Just curious also how I go about testing the transactions with the test card details as per the SecurePay website here: http://www.esecpayments.com.au/index.jsp?id=ssldevel There are three test cards which they use: testsuccess - Always successfully processed and authorised testfailure - Always successfully processed and refused testtimeout - Never responds and the transaction will time out The only problem is that the osCommerce (I'm using MS2) ccvalidation and credit card number conversion script (I'm assuming there's a script to ensure there's no text in the card number) doesn't let the above test cards go through. Any help would be great as this is the last step I've got before taking credit cards online. Thanks so much for your help, Tony
  4. Steve, Thanks for your prompt response. I was looking at that line and wondering what there was I could do to correct it. What's the problem with it? Does it include the dollar sign or decimal as part of the conversion or something? It's not a big deal for myself at the minute and probably won't be for a little while, though it'd be good to work it out so it functions with multi-currency. Thanks, Tony
  5. I'm receiving the same 'Invalid Transaction Amount' error as this post: http://www.oscommerce.com/forums/index.php?showtopic=77003 Anyone have ideas on how to correct the problem? Thanks, Tony
  6. Thanks for the feedback Jeffery. I'm not sure why that code isn't working... must be something to do with the way I've set it up on my store, which is working fine. You can see an example of it by clicking on my WWW button. When I get some time, probably within a week or so, I'll review my setup and see where the problem is... any assistance from anyone would be greatly appreciated, since I'm pretty straped for time at the minute. Cheers, Tony
  7. It's not a bug I've heard of or seen before. Go over your installation instructions and make sure that everything is installed correctly.
  8. This post should solve a few issues... some have already been resolved in earlier post, though some people are not willing to do the 'hard yards'and read through 38 pages. I personally would recommend reading through them so you learn a lot more about the way the menu works... but here's some tips anyway. If your menu is hovering over the rest of your page, this is probably due the 'require(DIR_WS_INCLUDES . 'coolmenu.php');' code being called after the category box. This next tip will solve the first problem, and also the issue of the menu appearing on the page in mid-air before the rest of the page is loaded. This will ensure that the menu loads in sync with the categories box. In catalog\includes\boxes\coolmenu.php find this at the top of the file: <?php /* ------------------------------------------------ coolMenu for osCommerce author: Andreas Kothe url: http://www.oddbyte.de Released under the GNU General Public License ------------------------------------------------ */ ?> <!-- coolMenu //--> <!-- copyright 2003 Andreas Kothe - www.oddbyte.de // --> and add the following after it as per below: <?php /* ------------------------------------------------ coolMenu for osCommerce author: Andreas Kothe url: http://www.oddbyte.de Released under the GNU General Public License ------------------------------------------------ */ ?> <!-- coolMenu //--> <!-- copyright 2003 Andreas Kothe - www.oddbyte.de // --> <?php /* CoolMenu - BOF */ require(DIR_WS_INCLUDES . 'coolmenu.php'); /* CoolMenu - EOF */ ?> Now you can remove all copies of the following from the body tags of your other files: <!-- coolMenu //--> <?php require(DIR_WS_INCLUDES . 'coolmenu.php'); ?> <!-- coolMenu_eof //--> This also works well if you have several other files, like links pages, FAQ pages, etc. since the code gets called with the menu... if you don't call the menu, then the code isn't parsed for no reason. :rolleyes: Also, in catalog\includes\application_top.php add the following to the end of the file before the final '?>': /* Cool Menu - BOF */ ?> <script LANGUAGE="JavaScript1.2" SRC="includes/menu_animation.js"></SCRIPT> <?php } /* Cool Menu - BOF */ By doing this, you can also remove the other instances of it from the <head> tags of all your files. :D Hope this helps... let me know if you come across any problems with these tips. Cheers, Tony
  9. I have this module installed on a post MS2 store with a few modifications to the code for some custom features. (The WWW button below is my store with the Wishlist installed.) Can either yourself, or your programmer PM me with details of the problems. (Please try to be specific about them, so I can pinpoint it in my own install.) Hopefully we'll be able to work it out and post some more details in this thread for the rest of the community. Cheers, Tony
  10. Bruce, Here's a quick copy of my 'header_tags.php' file. If there's no title listed in the database (ie None entered on products page in admin), then it will show the products name as part of the title. I'd like to be able to get it showing the manufacturer also, though my testing so far hasn't been successful. (ie. Store Name : Manufacturer : Product Name) Cheers, Tony <?php // /catalog/includes/header_tags.php // WebMakers.com Added: Header Tags Generator v2.0 // Add META TAGS and Modify TITLE // // NOTE: Globally replace all fields in products table with current product name just to get things started: // In phpMyAdmin use: UPDATE products_description set PRODUCTS_HEAD_TITLE_TAG = PRODUCTS_NAME // require(DIR_WS_LANGUAGES . $language . '/' . 'header_tags.php'); // echo '<!-- BOF: Generated Meta Tags -->' . "n"; // echo ' <META NAME="Reply-to" CONTENT="' . HEAD_REPLY_TAG_ALL . '">' . "n"; $the_desc=''; $the_key_words=''; $the_title=''; // Define specific settings per page: switch (true) { // DEFAULT.PHP case (strstr($_SERVER['PHP_SELF'],'index.php') or strstr($PHP_SELF,'index.php') ): $the_category_query = tep_db_query("select cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'"); $the_category = tep_db_fetch_array($the_category_query); $the_manufacturers_query= tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"); $the_manufacturers = tep_db_fetch_array($the_manufacturers_query); if (HTDA_DEFAULT_ON=='1') { $the_desc= HEAD_DESC_TAG_DEFAULT . ' ' . HEAD_DESC_TAG_ALL; } else { $the_desc= HEAD_DESC_TAG_DEFAULT; } if (HTKA_DEFAULT_ON=='1') { $the_key_words= HEAD_KEY_TAG_ALL . ' ' . HEAD_KEY_TAG_DEFAULT; } else { $the_key_words= HEAD_KEY_TAG_DEFAULT; } if (HTTA_DEFAULT_ON=='1') { $the_title= HEAD_TITLE_TAG_ALL . ' ' . HEAD_TITLE_TAG_DEFAULT . " " . $the_category['categories_name'] . $the_manufacturers['manufacturers_name']; } else { $the_title= HEAD_TITLE_TAG_DEFAULT; } break; // PRODUCT_INFO.PHP case ( strstr($_SERVER['PHP_SELF'],'product_info.php') or strstr($PHP_SELF,'product_info.php') ): // $the_product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_keywords_tag, pd.products_head_desc_tag, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and pd.products_id = '" . $HTTP_GET_VARS['products_id'] . "'"); $the_product_info_query = tep_db_query("select pd.language_id, p.products_id, pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_keywords_tag, pd.products_head_desc_tag, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'" . " and pd.language_id ='" . (int)$languages_id . "'"); $the_product_info = tep_db_fetch_array($the_product_info_query); $the_manufacturers_query= tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"); $the_manufacturers = tep_db_fetch_array($the_manufacturers_query); if (empty($the_product_info['products_head_desc_tag'])) { $the_desc= HEAD_DESC_TAG_ALL; } else { if ( HTDA_PRODUCT_INFO_ON=='1' ) { $the_desc= $the_product_info['products_head_desc_tag'] . ' ' . HEAD_DESC_TAG_ALL; } else { $the_desc= $the_product_info['products_head_desc_tag']; } } if (empty($the_product_info['products_head_keywords_tag'])) { $the_key_words= HEAD_KEY_TAG_ALL; } else { if ( HTKA_PRODUCT_INFO_ON=='1' ) { $the_key_words= $the_product_info['products_head_keywords_tag'] . ' ' . HEAD_KEY_TAG_ALL; } else { $the_key_words= $the_product_info['products_head_keywords_tag']; } } if (empty($the_product_info['products_head_title_tag'])) { // $the_title= HEAD_TITLE_TAG_ALL; $the_title= HEAD_TITLE_TAG_ALL . ' : ' . clean_html_comments($the_product_info['products_name']); } else { if ( HTTA_PRODUCT_INFO_ON=='1' ) { $the_title= HEAD_TITLE_TAG_ALL . ' : ' . clean_html_comments($the_product_info['products_head_title_tag']); } else { $the_title= clean_html_comments($the_product_info['products_head_title_tag']); } } break; // PRODUCTS_NEW.PHP case ( strstr($_SERVER['PHP_SELF'],'products_new.php') or strstr($PHP_SELF,'products_new.php') ): if ( HEAD_DESC_TAG_WHATS_NEW!='' ) { if ( HTDA_WHATS_NEW_ON=='1' ) { $the_desc= HEAD_DESC_TAG_WHATS_NEW . ' ' . HEAD_DESC_TAG_ALL; } else { $the_desc= HEAD_DESC_TAG_WHATS_NEW; } } else { $the_desc= HEAD_DESC_TAG_ALL; } if ( HEAD_KEY_TAG_WHATS_NEW!='' ) { if ( HTKA_WHATS_NEW_ON=='1' ) { $the_key_words= HEAD_KEY_TAG_WHATS_NEW . ' ' . HEAD_KEY_TAG_ALL; } else { $the_key_words= HEAD_KEY_TAG_WHATS_NEW; } } else { $the_key_words= HEAD_KEY_TAG_ALL; } if ( HEAD_TITLE_TAG_WHATS_NEW!='' ) { if ( HTTA_WHATS_NEW_ON=='1' ) { $the_title= HEAD_TITLE_TAG_ALL . ' ' . HEAD_TITLE_TAG_WHATS_NEW; } else { $the_title= HEAD_TITLE_TAG_WHATS_NEW; } } else { $the_title= HEAD_TITLE_TAG_ALL; } break; // SPECIALS.PHP case ( strstr($_SERVER['PHP_SELF'],'specials.php') or strstr($PHP_SELF,'specials.php') ): if ( HEAD_DESC_TAG_SPECIALS!='' ) { if ( HTDA_SPECIALS_ON=='1' ) { $the_desc= HEAD_DESC_TAG_SPECIALS . ' ' . HEAD_DESC_TAG_ALL; } else { $the_desc= HEAD_DESC_TAG_SPECIALS; } } else { $the_desc= HEAD_DESC_TAG_ALL; } if ( HEAD_KEY_TAG_SPECIALS=='' ) { // Build a list of ALL specials product names to put in keywords $new = tep_db_query("select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status = '1' and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' order by s.specials_date_added DESC "); $row = 0; $the_specials=''; while ($new_values = tep_db_fetch_array($new)) { $the_specials .= clean_html_comments($new_values['products_name']) . ', '; } if ( HTKA_SPECIALS_ON=='1' ) { $the_key_words= $the_specials . ' ' . HEAD_KEY_TAG_ALL; } else { $the_key_words= $the_specials; } } else { $the_key_words= HEAD_KEY_TAG_SPECIALS . ' ' . HEAD_KEY_TAG_ALL; } if ( HEAD_TITLE_TAG_SPECIALS!='' ) { if ( HTTA_SPECIALS_ON=='1' ) { $the_title= HEAD_TITLE_TAG_ALL . ' ' . HEAD_TITLE_TAG_SPECIALS; } else { $the_title= HEAD_TITLE_TAG_SPECIALS; } } else { $the_title= HEAD_TITLE_TAG_ALL; } break; // PRODUCTS_REVIEWS_INFO.PHP and PRODUCTS_REVIEWS.PHP case ( strstr($_SERVER['PHP_SELF'],'product_reviews_info.php') or strstr($_SERVER['PHP_SELF'],'product_reviews.php') or strstr($PHP_SELF,'product_reviews_info.php') or strstr($PHP_SELF,'product_reviews.php') ): if ( HEAD_DESC_TAG_PRODUCT_REVIEWS_INFO=='' ) { if ( HTDA_PRODUCT_REVIEWS_INFO_ON=='1' ) { $the_desc= tep_get_header_tag_products_desc((int)$HTTP_GET_VARS['reviews_id']) . ' ' . HEAD_DESC_TAG_ALL; } else { $the_desc= tep_get_header_tag_products_desc((int)$HTTP_GET_VARS['reviews_id']); } } else { $the_desc= HEAD_DESC_TAG_PRODUCT_REVIEWS_INFO; } if ( HEAD_KEY_TAG_PRODUCT_REVIEWS_INFO=='' ) { if ( HTKA_PRODUCT_REVIEWS_INFO_ON=='1' ) { $the_key_words= tep_get_header_tag_products_keywords((int)$HTTP_GET_VARS['reviews_id']) . ' ' . HEAD_KEY_TAG_ALL; } else { $the_key_words= tep_get_header_tag_products_keywords((int)$HTTP_GET_VARS['reviews_id']); } } else { $the_key_words= HEAD_KEY_TAG_PRODUCT_REVIEWS_INFO; } if ( HEAD_TITLE_TAG_PRODUCT_REVIEWS_INFO=='' ) { if ( HTTA_PRODUCT_REVIEWS_INFO_ON=='1' ) { $the_title= HEAD_TITLE_TAG_ALL . ' ' . tep_get_header_tag_products_title((int)$HTTP_GET_VARS['reviews_id']); } else { $the_title= tep_get_header_tag_products_title((int)$HTTP_GET_VARS['reviews_id']); } } else { $the_title= HEAD_TITLE_TAG_PRODUCT_REVIEWS_INFO; } break; // ALL OTHER PAGES NOT DEFINED ABOVE default: $the_desc= HEAD_DESC_TAG_ALL; $the_key_words= HEAD_KEY_TAG_ALL; $the_title= HEAD_TITLE_TAG_ALL; break; } echo ' <META NAME="Description" Content="' . $the_desc . '">' . "n"; echo ' <META NAME="Keywords" CONTENT="' . $the_key_words . '">' . "n"; if (isset($HTTP_GET_VARS['products_id'])) { echo ' <title>' . $the_title . '</title>' . "n"; } else { echo "<title>" . TITLE . " : " . $breadcrumb->currentTitle() . "</title>"; } // echo '<!-- EOF: Generated Meta Tags -->' . "n"; ?>
  11. The define main page is another contribution, which you obviously don't have installed. Find this code: <tr> <td class="main"><?php echo TEXT_MAIN; ?></td> </tr> and add the new code after it so your final code should look like: <tr> <td class="main"><?php echo TEXT_MAIN; ?></td> </tr> <tr> <td><?php include(DIR_WS_MODULES . MAIN_CATEGORIES); ?></td> </tr> if you want to put a space between the TEXT_MAIN and the MAIN_CATEGORIES, use this code: <tr> <td class="main"><?php echo TEXT_MAIN; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><?php include(DIR_WS_MODULES . MAIN_CATEGORIES); ?></td> </tr> Cheers, Tony
  12. Sorry I don't understand what you mean by 'CB Payment'? Can you please explain it differently, and I will see how I can help. Cheers, Tony
  13. Sandy, You were right in removing the line AUS_BANK line. $this->enabled = ((MODULE_PAYMENT_AUS_BANK_STATUS == 'True') ? true : false); It was carried over from the Australian Bank module. The $order->billing and $order->delivery work like this: If you use $order->billing, the NZ Bank option will show if someone uses an overseas address (ie. outside the zone) and a NZ address for billing. If you use $order->delivery, it doesn't matter if a NZ billing address is supplied, the NZ Bank option won't show if the shipping address is outside the set zone. I use $order->delivery, since I don't ship outside of Australia, though this is up to you personally. Another option would be to set all shipping modules to delivery and all payment modules to billing, this should pretty much guarentee that you won't get an order going somewhere where you don't ship. I've uploaded a new version of the code, without the line of code from the Australian Bank version. Thanks for picking up on that! :) Also, I've removed all the additional ; characters from the code. All lines in the install function now end correctly now())"); not now());"); Hope this helps to clear it up some confusion, Tony
  14. The code has been test with MS2 and works fine as is from the download. It should also work with MS1 no problems, though I haven't tested it. The modified code you've mentioned from line 101 doesn't look right as you're terminating the string early. My guess is that you will get errors if you try to uninstall, and reinstall the module. As for lines 42 and 47, these should be based on delivery address not billing. As above, the download should work fine. Just don't forget to copy the unmodified files to their directories and click 'remove' and then 'install' to clear your old code from the database and add the correct code from the unmodified files. Let me know how it goes once you've done the remove/reinstall process with the unmodified code from the download. Cheers, Tony
  15. I've just tested it from the download again, and it works perfect. Remember to change the default 'Sort Order' to 1 or higher, if it remains on 0 it will not display. Also, I'm not sure if there are any other contributions created specifically for New Zealand, this one is a modified version of Steve Kemps Australian Bank Transfer. I think you'll find that most Australian modules will satisfy, or even other countries with a little tweaking, little the Italian module: Partita IVA which I tweaked a little to use it for the Australian ABN. Hope the above works for you... there should be no problems once you change the default sort order. Tony
  16. Jenn, I'm using IE6 and your coolMenu shows in the left column for me. Where would you like to show the links? If you click on my WWW button below, you'll see how I put the All Products link at the bottom of the menu. Is this the type of thing you're after? Or did you want to add links in the Menu itself, without them being products? Cheers, Tony
  17. I run the coolMenu on my site, and have tested it locally with my full width site (I don't operate a centred store) on 800 x 600 and 1024 x 768 (multi-monitor setup) and it shows it in the menu in the correct place. If the sizes were going to affect the layout I would guess that it would affect it's position in a standard setup. All you can do I guess is try... if it works (I think it will...) it's a bonus! :) Tony
  18. Tiapan: If you're using IE, have a look in the bottom left hand corner when you load the page, and you will see a 'Script Error' appear. Double click and it will tell you details of the error. A quick look at line 132 shows the CPU'S category. I'm guessing the CPU[']S character is causing the problems. Try renaming the CPU'S category to CPUs and see how you go. fiscus Yes, you can use it with a centered shop... the menu isn't actually a part of the layout, it just appears that way because it hovers over the category box. To adjust the menu location you need to edit the includescoolmenu.php file. //Menu properties oCMenu.pxBetween=0 oCMenu.fromLeft=8 oCMenu.fromTop=116 oCMenu.rows=0 oCMenu.menuPlacement="left" The two settings you need to concern yourself with are oCMenu.fromLeft and oCMenu.fromTop. HTH, Tony
  19. Peter, All is working on my web server now... not sure what the issue is since I cleared the cache before I tested it. The problem still remains on my local server, and I'm in the middle of testing to find the problem. I didn't alter any files between when it was working and when it wasn't... so I'm still trying to work it out on the local server. :shock: * Playing Twilight Zone theme * :) Thanks for all your help, Tony
  20. Peter, Thanks for your reply. Yes, the problem only occurs with coolMenu when JS is turned on. When JS is off, the store operates as per normal with the text based menu. I have replaced the correct file... tried my original file and the menu works fine (though is doesn't contain 'no-javascript' code), tried it with the updated file and the menu appears but the box isn't created, so the 'Manufacturers' box is now at the top and coolMenu is hovering on top of it (also covering the 'Search' box due to the menu height). I think the problem is with the creation of the box since everything else about coolMenu is working fine. Anyone else come across this problem? Thanks again Peter for your input so far... :) Tony
  21. Has anyone tried out the new, 'No JavaScript' add-on for coolMenu by Marc Zacher? Contribution here: http://www.oscommerce.com/community/contributions,1033 I've implemented it, though my category box isn't showing. :( It's working correctly with the menus, showing coolMenu when Java is enabled and showing the standard text menu when Java is disabled, though the category box isn't being created which causes coolMenu to hover over the Manufacturers and Search boxes rather than pushing them down due the category box above. Any help is getting the 'No JavaScript' add-on working correctly would be great! :) Thanks, Tony
  22. Are you using the latest version of the wishlist update download? http://www.oscommerce.com/community/contributions,1208 I've compared my remove_wishlist to the latest version and it's the same: case 'remove_wishlist' : tep_db_query("delete from " . TABLE_WISHLIST . " WHERE customers_id=$customer_id AND products_id=$pid"); // tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters), 'NONSSL')); break; Let me know how you go... :) Tony
  23. Yes, the wishlist. As per Johnsons post and my post on page 7 of this thread... I have it working on MS2.2 (Current MS3 Daily Snapshot). If you have any specific questions about it... or want some info on part of the code (can't offer full files because I have over 70 other contributions installed) you'd be better to post to this thread than PM (I will read this thread anyway, so I will get it... just that my PM Inbox is always overflowing). Cheers, Tony
  24. TB: Post moved to correct thread on behalf of 'killer-g' after installing and reading this thread about 3 times. i got this contrib working. theres only one thing which has already been asked but never answered.. - the queue does not show anything in my admin panel and the db table is empty to where do i find the funktions that do fill the gv_queue table? Maybe there is an error. Furthermore a gift zertifikate needs to start with GIFT. This seems to be defined in catalog/includes/classes/shopping_cart.php in line 232.(Maybe there is an error there because there is an ^ in front of it) I would like to rename this to something else since gift means poison in german and that don?t look to nice in the shop. thanks for some help ...installed several contribs but this one is really getting me 2 work, since it is a very critical application
  25. Last I knew, the developer ceased all support and development for this contribution.
×
×
  • Create New...