Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted (edited)

Hi, re: NZ Bank Transfer Module. I am getting the following error when I activate the module.

I enter the Payment information ie accnt name, accnt number and bank and update.

When it appears in the shop I get the following ' ' before the account number and Bank name.

How do I get rid of this and where did it come from?

 

I have also posted this on snowtech.com,au but have had no reply.

 

I checked the script but can't find where this is coming from..my php is not great.

 

Can anyone help.

Edited by craigcjc
Posted
Hi, re: NZ Bank Transfer Module. I am getting the following error when I activate the module.

I enter the Payment information ie accnt name, accnt number and bank and update.

When it appears in the shop I get the following ' ' before the account number and Bank name.

How do I get rid of this and where did it come from?

 

I have also posted this on snowtech.com,au but have had no reply.

 

I checked the script but can't find where this is coming from..my php is not great.

 

Can anyone help.

post the language file.

Posted

<?php

 

/*

 

$Id: nzbank.php,v 1.3 2003/06/13

 

 

 

osCommerce, Open Source E-Commerce Solutions

 

http://www.oscommerce.com

 

 

 

Copyright © 2003 osCommerce

 

 

 

Released under the GNU General Public License

 

*/

 

 

 

class nzbank {

 

var $code, $title, $description, $enabled;

 

 

 

// class constructor

 

function nzbank() {

 

 

 

global $order;

 

$this->code = 'nzbank';

 

$this->title = MODULE_PAYMENT_NZ_BANK_TEXT_TITLE;

 

$this->description = MODULE_PAYMENT_NZ_BANK_TEXT_DESCRIPTION;

 

$this->email_footer = MODULE_PAYMENT_NZ_BANK_TEXT_EMAIL_FOOTER;

 

$this->sort_order = MODULE_PAYMENT_NZ_BANK_SORT_ORDER;

 

$this->enabled = ((MODULE_PAYMENT_NZ_BANK_STATUS == 'True') ? true : false);

 

 

 

if ((int)MODULE_PAYMENT_NZ_BANK_ORDER_STATUS_ID > 0) {

 

$this->order_status = MODULE_PAYMENT_NZ_BANK_ORDER_STATUS_ID;

 

}

 

 

 

if (is_object($order)) $this->update_status();

 

}

 

 

 

// class methods

 

function update_status() {

 

global $order;

 

 

 

if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_NZ_BANK_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_NZ_BANK_ZONE . "' and zone_country_id = '" . $order->delivery['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->delivery['zone_id']) {

 

$check_flag = true;

 

break;

 

}

 

}

 

 

 

if ($check_flag == false) {

 

$this->enabled = false;

 

}

 

}

 

}

 

 

 

function javascript_validation() {

 

return false;

 

}

 

 

 

function selection() {

 

return array('id' => $this->code,

 

'module' => $this->title);

 

}

 

 

 

function pre_confirmation_check() {

 

return false;

 

}

 

 

 

function confirmation() {

 

return array('title' => MODULE_PAYMENT_NZ_BANK_TEXT_DESCRIPTION);

 

}

 

 

 

function process_button() {

 

return false;

 

}

 

 

 

function before_process() {

 

return false;

 

}

 

 

 

function after_process() {

 

return false;

 

}

 

 

 

function get_error() {

 

return false;

 

}

 

 

 

function check() {

 

if (!isset($this->_check)) {

 

$check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_NZ_BANK_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 NZ Bank Transfer Module', 'MODULE_PAYMENT_NZ_BANK_STATUS', 'True', 'Do you want to accept NZ Bank Transfer 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_NZ_BANK_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 ('Sort order of display.', 'MODULE_PAYMENT_NZ_BANK_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, date_added) values ('Bank Account No.', 'MODULE_PAYMENT_NZ_BANK_ACCNUM', '12345678', 'Bank Account No.', '6', '1', now())");

 

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Bank Account Name', 'MODULE_PAYMENT_NZ_BANK_ACCNAM', 'Joe Bloggs', 'Bank account name', '6', '1', now())");

 

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Bank Name', 'MODULE_PAYMENT_NZ_BANK_BANKNAM', 'The Bank', 'Bank Name', '6', '1', 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_NZ_BANK_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_NZ_BANK_STATUS', 'MODULE_PAYMENT_NZ_BANK_ZONE', 'MODULE_PAYMENT_NZ_BANK_SORT_ORDER', 'MODULE_PAYMENT_NZ_BANK_ACCNUM', 'MODULE_PAYMENT_NZ_BANK_ACCNAM', 'MODULE_PAYMENT_NZ_BANK_BANKNAM', 'MODULE_PAYMENT_NZ_BANK_ORDER_STATUS_ID');

 

 

 

}

 

}

 

?>

Posted

I see the   below in the script, do I just delete it?

 

I forgot to look at the english file!

 

<?php

 

/*

 

$Id: nzbank.php,v v 1.3 2003/06/13

 

 

 

osCommerce, Open Source E-Commerce Solutions

 

http://www.oscommerce.com

 

 

 

Copyright © 2003 osCommerce

 

 

 

Released under the GNU General Public License

 

*/

 

 

 

define('MODULE_PAYMENT_NZ_BANK_TEXT_TITLE', 'NZ Bank Transfer Payment');

 

define('MODULE_PAYMENT_NZ_BANK_TEXT_DESCRIPTION', '<BR>Please use the following details to transfer your total order value:<br><br>Account No.:    ' . MODULE_PAYMENT_NZ_BANK_ACCNUM . '<BR>Account Name: ' . MODULE_PAYMENT_NZ_BANK_ACCNAM . '<BR>Bank Name:     ' . MODULE_PAYMENT_NZ_BANK_BANKNAM . '<br><br>Your order will not ship until we receive payment in the above account.');

 

define('MODULE_PAYMENT_NZ_BANK_TEXT_EMAIL_FOOTER', "Please use the following details to transfer your total order value:\n\nAccount No.: " . MODULE_PAYMENT_NZ_BANK_ACCNUM . "\nAccount Name: " . MODULE_PAYMENT_NZ_BANK_ACCNAM . "\nBank Name: " . MODULE_PAYMENT_NZ_BANK_BANKNAM . "\n\nYour order will not ship until we receive payment in the above account.");

 

?>

Posted (edited)
I see the   below in the script, do I just delete it?

 

Yes, I think so. I was comparing yours to the austbank module, and it does not use   in the text area.

Edited by Coopco

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...