Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Cannot redeclare class


Recommended Posts

I just completed the installation but get the following error message when hitting "contunue" on the checkout_payment.php page.

 

What is wrong????

 

Fatal error: Cannot redeclare class paypal in /home/maxtravel/domains/maxtravelguide.com/public_html/includes/modules/payment/paypal.php on line 31

 

Your help is apprciated!!!!

Frank

 

 

ps. the following code in from checkout_confirmation.php (line 62 onwards)

 

it seems to me that I have a { to many or a } to few

what is the correct syntax here???

 

 

// ################# Added CGV Contribution ##################"

// CCGV Contribution

$order_total_modules = new order_total;

$order_total_modules->collect_posts();

$order_total_modules->pre_confirmation_check();

 

// if ( ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) ) || (is_object($$payment) && ($$payment->enabled == false)) ) {

if ( (is_array($payment_modules->modules)) && (sizeof($payment_modules->modules) > 1) && (!is_object($$payment)) && (!$credit_covers) )

{

 

// ################# End Added CGV Contribution ##################"

 

if (is_array($payment_modules->modules)) {

$payment_modules->pre_confirmation_check();

}

Link to comment
Share on other sites

Hi Frank,

 

I've the identical same problem:

 

in the checkout_confirmation.php my error is:

 

Fatal error: Cannot redeclare class cod in /Shop/includes/modules/payment/cod.php on line 13

 

I've seen that, in admin, if I disinstall the COD module (other modules are already disinstalled) the checkot process continue without problem; if I reinstall the COD module (or other, i.e. paypal module) the error returns.

 

The code that you posted seems to be correct (if you have a { to many or a } to few you have parse error.

 

Fabio

Link to comment
Share on other sites

  • 1 month later...
Hi Frank,

 

I've the identical same problem:

 

in the checkout_confirmation.php my error is:

 

Fatal error: Cannot redeclare class cod in /Shop/includes/modules/payment/cod.php on line 13

 

I've seen that, in admin, if I disinstall the COD module (other modules are already disinstalled) the checkot process continue without problem; if I reinstall the COD module (or other, i.e. paypal module) the error returns.

 

The code that you posted seems to be correct (if you have a { to many or a } to few you have parse error.

 

Fabio

 

I had the same problem. You need to delete the following line in checkout_confirmation.php -

 

$payment_modules = new payment($payment);

 

Delete the second one and leave the first.

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