Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

invoice module problem- help please!


Guest

Recommended Posts

Hello!

 

I have a problem with the Addon Module - invoice_1.30 - that i Downloaded from osc homepage.

It works under language english but not under language swedish . When I change from English to swedish and test to buy something and selecting invoice - when the checkout_success.php should load i get error -

 

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/jbnmedia/domains/jbnmedia.net/public_html/home/catalog/includes/functions/database.php:13) in /home/jbnmedia/domains/jbnmedia.net/public_html/home/catalog/includes/functions/database.php on line 25

 

 

-------------------

It works fine under english an the only thing that separates each other is the invocie file under each language :

 

 

/CATALOG/INCLUDES/LANGUAGE/SWEDISH/MODULES/INVOICE.PHP

Swedish

 

<?

/*

$Id: invoice.php,v 1.30 2004/09/20 mm $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

define('MODULE_PAYMENT_INVOICE_TEXT_DESCRIPTION', 'Faktura');

define('MODULE_PAYMENT_INVOICE_TEXT_TITLE', 'Faktura');

?>

------------------------------------------------------------------------

 

/CATALOG/INCLUDES/LANGUAGE/ENGLISH/MODULES/INVOICE.PHP

English

 

<?

/*

$Id: invoice.php,v 1.30 2004/09/20 mm $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

define('MODULE_PAYMENT_INVOICE_TEXT_DESCRIPTION', 'Invoice');

define('MODULE_PAYMENT_INVOICE_TEXT_TITLE', 'Invoice');

?>

 

-----------------------------------------------------------------------------------------------

/CATALOG/INCLUDES/MODULES/PAYMENT/INVOICE.PHP

The Module

 

 

<?

/*

$Id: invoice.php,v 1.30 2004/09/20 mm $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

 

class invoice {

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

 

// class constructor

function invoice() {

$this->code = 'invoice';

$this->title = MODULE_PAYMENT_INVOICE_TEXT_TITLE;

$this->description = MODULE_PAYMENT_INVOICE_TEXT_DESCRIPTION;

$this->sort_order = MODULE_PAYMENT_INVOICE_SORT_ORDER;

$this->enabled = MODULE_PAYMENT_INVOICE_STATUS;

}

 

// class methods

function javascript_validation() {

return false;

}

 

function selection() {

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

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

}

 

function pre_confirmation_check(){

return false;

}

 

function confirmation() {

return false;

}

 

function process_button() {

return false;

}

 

function before_process() {

return false;

}

 

function after_process() {

return false;

}

 

function output_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_INVOICE_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, date_added, set_function) values ('Allow Invoice', 'MODULE_PAYMENT_INVOICE_STATUS', 'True', 'Do you want to accept invoice payments?', '6', '10', now(), 'tep_cfg_select_option(array(\"True\", \"False\"),')");

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_INVOICE_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0' , now())");

}

 

function remove() {

tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_INVOICE_STATUS'");

}

 

function keys() {

$keys = array('MODULE_PAYMENT_INVOICE_STATUS', 'MODULE_PAYMENT_INVOICE_SORT_ORDER');

 

return $keys;

}

}

 

-------------------------------------------------------------------------------------

 

/ Johan

Link to comment
Share on other sites

  • 2 months later...

hej svejs, jag har testat den och den fungerar.

 

men inte så som den borde, det saknas en del, som jag håller på och kodar, text personnummer.

(jag ska göra den så att dob eller en särskild addon för personnummer inte behövs och att "betalas senast" ska finnas.)

 

Om du inte får ordning på den du har nu, så vänta tills min är testad.

 

hälsningar

 

Sara

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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