Jump to content

TB

Members
  • Content count

    585
  • Joined

  • Last visited

2 Followers

About TB

  • Birthday 03/13/1977

Profile Information

  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://forums.oscommerce.com/index.php?showtopic=77003 Anyone have ideas on how to correct the problem? Thanks, Tony
  6. TB

    coolMenu

    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. TB

    coolMenu

    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. TB

    coolMenu

    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. TB

    main categories again!!!!

    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
×