Forums / General Questions / order_total class and class redeclaration

order_total class and class redeclaration

Locked

Started by s_p_ike on 7 Feb 2007, 4:20 PM · Views: 1,775

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
7 Feb 2007, 4:20 PM
#1
s_p_ike avatar

s_p_ike

Zen Follower

Join Date:
Feb 2005
Location:
Italy
Posts:
178
Plugin Contributions:
0

order_total class and class redeclaration

Hello, I'd like to use order_total class in function function process_button() in a payment module.

If I simply use it, then when it's called later in the script (in the normal ZC flow), I obtain a 'cannot redeclare class... (all the classes initialized by order total modules).

How to avoid this?

Is it possible to 'destroy' a class declaration after having used it?

Thank you

Paolo De Dionigi
Co-maintainer of Zen Cart Italia

8 Feb 2007, 10:33 AM
#2
s_p_ike avatar

s_p_ike

Zen Follower

Join Date:
Feb 2005
Location:
Italy
Posts:
178
Plugin Contributions:
0

Re: order_total class and class redeclaration

Solved, I duplicated the order_total class (renaming it, obviously) then I removed from its code the 'sub' classes declaration (plus other things I didn't need) and now it works (obviously I call my own order_total clas).

Paolo De Dionigi
Co-maintainer of Zen Cart Italia