Zen Cart Logo
Forums / General Questions / Where do the OT classes get instantiated?

Where do the OT classes get instantiated?

Views: 654

Results 1 to 6 of 6
20 Jun 2013, 8:04 PM
#1
tcarden avatar

tcarden

Zen Follower

Join Date:
Oct 2012
Posts:
282
Plugin Contributions:
0

Where do the OT classes get instantiated?

Hey Everyone,
i'm trying to find where the OT classes get instantiated. i've looked in
checkout_default, checkout_stacked and main_page but do see where these classes get loaded.

i'm trying to set a variable that hopefully the ot_insurance class will read.

i'd greatly appreciated any help on this, thanks

mr. hazmat

20 Jun 2013, 9:06 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Where do the OT classes get instantiated?

Lines like this:

$some_objectname_here = new order_total;

But, I'm not sure how that's relevant. Just set your variable at whatever point you know what it needs to contain.

21 Jun 2013, 6:31 PM
#3
tcarden avatar

tcarden

Zen Follower

Join Date:
Oct 2012
Posts:
282
Plugin Contributions:
0

Re: Where do the OT classes get instantiated?

thanks Dr. Byte,

i've tried multiple things on the checkout page and can't get the var to be seen,

i'll keep trying

studying up on class properties, and static vars etc. to see why this isn't working...

btw - stopped getting email notifications from ZC and thought no one was answering my posts!

21 Jun 2013, 6:33 PM
#4
tcarden avatar

tcarden

Zen Follower

Join Date:
Oct 2012
Posts:
282
Plugin Contributions:
0

Re: Where do the OT classes get instantiated?

i should be more clear,

i'm trying to find where in the process all the ot_ classes get fired. , am not seeing it.

because, i can't get my variable state to be recognized, and thinking i'm not putting
it in the right place with re: to when the process() func runs.

21 Jun 2013, 11:17 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Where do the OT classes get instantiated?

As I said before, the lines which say "$order_total_modules = new order_total;" launches the includes/classes/order_total.php class, which then in turn instantiates all the order-total modules based on their status and sort order.

But now your last post adds another question which you didn't mention before. You asked about when the process() method is fired. That's done in the line that says: ```
$order_total_modules->process();

4 Jul 2013, 8:23 PM
#6
tcarden avatar

tcarden

Zen Follower

Join Date:
Oct 2012
Posts:
282
Plugin Contributions:
0

Re: Where do the OT classes get instantiated?

thanks, yes i found those