Jump to content
Sign in to follow this  
FridayNight

PayPal returning customer - cannot redeclare class order_total

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!

Share this post


Link to post
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)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×