Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PayPal returning customer - cannot redeclare class order_total


FridayNight

Recommended Posts

Since I update my shop and did some various changes I figured out now as it is live again that customers who pay with PayPal get this error when they return to the shop:

 

cannot redeclare class order_total

 

I guess the problem is within the checkout_process.php?

 

Would be nice if somebody is able to help me with this issue. I can paste all the code if needed!

Link to comment
Share on other sites

FIXED!

 

with these changes:

 

in /includes/classes/order_total.php:

 

//				include(DIR_WS_LANGUAGES . $language . '/modules/order_total/' . $value);
//				include(DIR_WS_MODULES . 'order_total/' . $value);
			require_once(DIR_WS_LANGUAGES . $language . '/modules/order_total/' . $value);
			require_once(DIR_WS_MODULES . 'order_total/' . $value);

(// old code)

 

 

in /checkout_process.php:

/*
//PayPal Old
require(DIR_WS_CLASSES . 'order_total.php');
$order_total_modules = new order_total;
$order_totals = $order_total_modules->process();
*/
if(!class_exists('order_total')) {
include_once(DIR_WS_CLASSES . 'order_total.php');
$order_total_modules = new order_total;
$order_totals = $order_total_modules->process();
}

(/* old code */)

 

 

and in /includes/modules/payment/paypal_ipn.php:

//	  include(DIR_WS_CLASSES . 'order_total.php');
//	  $order_total_modules = new order_total;
//	  $order_totals = $order_total_modules->process();
if(!class_exists('order_total')) {
include_once(DIR_WS_CLASSES . 'order_total.php');
$order_total_modules = new order_total;
$order_totals = $order_total_modules->process();

(// old code)

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