Jump to content

TB

Members
  • Content count

    585
  • Joined

  • Last visited

Everything posted by TB

  1. Is there a module/contribution to allow the product image (and expanded image) to change on a change of the attributes? :?: T-Shirt for sale. ie. Default image is a blue t-shirt. Item has 2 attribute options... one for colour and the other for style. Item has 4 attributes for either blue, red, green or white. Item has 3 styles, polo, v-neck, or standard. On a change of these colour attributes, the image changes from the default blue t-shirt to the new selected colour... taking into account of the style selected also. On a change of the style attributes, the image change from the default standard t-shirt to the new selected style... taking into account of the colour selected also. It'd be good if there was a 'Show updated attributes' button, so both a style and a colour could be selected and have them both used to load the correct picture without selecting one option, then the other. Many thanks, Tony
  2. GeoIP Show Country <= Link to contribution To show customer country (based on IP address) in the following tables. ---------------------------- Administration ---------------------------- Customers -- Orders Tools -- Who's Online ---------------------------- Full country name is shown in status bar when mouse is over country code. (The 'mouse over' feature is known to only work with IE4+ and NS6+, unsure of other browsers.) Download includes a screenshot of 'Who's Online' table. Ease of installation: Novice - 2/5
  3. Does anyone know of any or using any decent accounting packages that they'd recommend? (Preferably one that allows for GST) I'm currently using MYOB. Has anyone though of, or working on a module for the MYOB accounting package? (Mind Your Own Business) I know this program can access information via ODBC... I wonder if it could somehow be linked to the OSC mySQL database. Cheers, Tony
  4. 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'); } } ?>
  5. 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
  6. 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
  7. 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
  8. 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
  9. I'm working on integrating a drop down box (based on contribution by David Garcia Watkins) into my categories box but I'm having some troubles... :roll: As you'll see from my example, I've got the drop down box in categories box, but I'd like it to have the same heading 'Categories Quick Select' as the one that's outside the box (included outside version as example of what I'm after). For some reason when I'm in a php statement I can't use the tables or rows... so I don't know how to define the 'smallText' class or even insert the heading. Also, how do I modify the bold line above the dropdown box when it's inside the main categores box? I don't mind it being there... just that I'd like it a little thinner to match the border of the table. In addition to all the above, the dropdown box is only working one way! If I select categories from the 'standard' categories menu, the dropdown box updates with the correct category/sub-category. But when I select the option from the dropdown box, the 'standard' categories menu does reflect the changes. I've managed to track it down to the replacing '$current_category_id' with '$categories_string' as is used for the main menu, but I can't seem to reuse the '$categories_string' array in my dropdown box. :roll: Here's my complete includesboxescategories.php (will work if copied to a new file. REMEMBER to backup your old categories.php! And also remember that this contribution is 'in the making' and NOT yet complete. :!: ) (changes made are mostly at the end of the file and are annotated.) <?php /* $Id: categories.php,v 1.23 2002/11/12 14:09:30 dgw_ Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ // modifications listed: // Add Bullet Images v1.0 // Quick Categories function tep_show_category($counter) { global $foo, $categories_string, $id; for ($a=0; $a<$foo[$counter]['level']; $a++) { $categories_string .= " "; } // Add Bullet Images V1.0 - start if (tep_has_category_subcategories($counter)) { if ( ($id) && (in_array($counter, $id)) ) { $categories_string .= '<img src="images/cat_arrow_down.gif" align="absmiddle"> '; } else { $categories_string .= '<img src="images/cat_arrow_right.gif" align="absmiddle"> '; } } else { $categories_string .= '<img src="images/cat_arrow_other.gif" align="absmiddle"> '; } // Add Bullet Images V1.0 - end $categories_string .= '<a href="'; if ($foo[$counter]['parent'] == 0) { $cPath_new = 'cPath=' . $counter; } else { $cPath_new = 'cPath=' . $foo[$counter]['path']; } $categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new); $categories_string .= '">'; if ( ($id) && (in_array($counter, $id)) ) { $categories_string .= '<b>'; } // display category name $categories_string .= $foo[$counter]['name']; if ( ($id) && (in_array($counter, $id)) ) { $categories_string .= '</b>'; } if (tep_has_category_subcategories($counter)) { $categories_string .= '->'; } $categories_string .= '</a>'; if (SHOW_COUNTS == 'true') { $products_in_category = tep_count_products_in_category($counter); if ($products_in_category > 0) { $categories_string .= ' (' . $products_in_category . ')'; } } $categories_string .= '<br>'; if ($foo[$counter]['next_id']) { tep_show_category($foo[$counter]['next_id']); } } ?> <!-- categories //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => BOX_HEADING_CATEGORIES ); new infoBoxHeading($info_box_contents, true, false); $categories_string = ''; $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . $languages_id ."' order by sort_order, cd.categories_name"); while ($categories = tep_db_fetch_array($categories_query)) { $foo[$categories['categories_id']] = array( 'name' => $categories['categories_name'], 'parent' => $categories['parent_id'], 'level' => 0, 'path' => $categories['categories_id'], 'next_id' => false ); if (isset($prev_id)) { $foo[$prev_id]['next_id'] = $categories['categories_id']; } $prev_id = $categories['categories_id']; if (!isset($first_element)) { $first_element = $categories['categories_id']; } } //------------------------ if ($cPath) { $new_path = ''; $id = split('_', $cPath); reset($id); while (list($key, $value) = each($id)) { unset($prev_id); unset($first_id); $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . $value . "' and c.categories_id = cd.categories_id and cd.language_id='" . $languages_id ."' order by sort_order, cd.categories_name"); $category_check = tep_db_num_rows($categories_query); if ($category_check > 0) { $new_path .= $value; while ($row = tep_db_fetch_array($categories_query)) { $foo[$row['categories_id']] = array( 'name' => $row['categories_name'], 'parent' => $row['parent_id'], 'level' => $key+1, 'path' => $new_path . '_' . $row['categories_id'], 'next_id' => false ); if (isset($prev_id)) { $foo[$prev_id]['next_id'] = $row['categories_id']; } $prev_id = $row['categories_id']; if (!isset($first_id)) { $first_id = $row['categories_id']; } $last_id = $row['categories_id']; } $foo[$last_id]['next_id'] = $foo[$value]['next_id']; $foo[$value]['next_id'] = $first_id; $new_path .= '_'; } else { break; } } } tep_show_category($first_element); $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => $categories_string ); new infoBox($info_box_contents); // Quick Categories - start $info_box_contents = array(); $info_box_contents[] = array('form' => '<form action="' . tep_href_link(FILENAME_DEFAULT) . '" method="get">', 'align' => 'left', 'text' => tep_draw_pull_down_menu('cPath', tep_get_categories(array(array('id' => '', 'text' => PULL_DOWN_DEFAULT))), $current_category_id, 'onchange="this.form.submit();"') ); new infoBox($info_box_contents); // Quick Categories - end ?> <!-- Quick Categories - start This is the example of what I'm after... only that I'd like it inside the main categories box. //--> <tr><?php echo tep_draw_form('goto', FILENAME_DEFAULT, '', 'get'); ?> <td class="smallText" align="center"><?php echo 'Quick Categories' . ' ' . tep_draw_pull_down_menu('cPath', tep_get_categories(array(array('id' => '', 'text' => PULL_DOWN_DEFAULT))), $current_category_id, 'onChange="this.form.submit();"'); ?></td> </form></tr> <!-- Quick Categories - end //--> </td> </tr> <!-- categories_eof //-->
  10. Are there any contributions that allow the copying of a catagory/sub-category to another category, similar to the 'copy product' feature? eg. A push-bike company Bikes -- Girls bikes -- Helmets -- Accessoires -- Boys bikes -- Helmets -- Accessories The helemts and accessories are universal between both girls and boys bikes, but don't want to go through the process of creating new categories under both girls and boys bikes ('real' site has many more than 2 categories) and copying each product individually. That's where a feature 'copy category' would be great! Similar to the 'copy product' feature, a change in one category would reflect in all 'linked' categories. Many thanks, Tony
  11. NZ Bank Transfer module for those New Zealand osCommerce users who want to offer bank transfer as a payment method. This module displays: Account Name, Account Number and Bank Name. http://www.oscommerce.com/community/contributions,1441 Thanks to: Phil Townsend for the original UK Bank Transfer module. Steve Kemp for modifying the UK module to suit the Australian osCommerce sites, as well as adding administration functionality. This NZ version is based on the Australian version by Steve Kemp.
  12. 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
  13. 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.
  14. 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
  15. 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
  16. 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"; ?>
  17. 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
  18. 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
  19. 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
  20. 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
  21. 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
  22. TB

    coolMenu

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

    coolMenu

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

    coolMenu

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

    coolMenu

    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
×