Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2012
    Posts
    282
    Plugin Contributions
    0

    Default 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

  2. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Where do the OT classes get instantiated?

    Lines like this:
    Code:
    $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.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Oct 2012
    Posts
    282
    Plugin Contributions
    0

    Default 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!

  4. #4
    Join Date
    Oct 2012
    Posts
    282
    Plugin Contributions
    0

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

  5. #5
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default 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:
    Code:
    $order_total_modules->process();
    ... which tells the includes/classes/order_total.php class to run the process() method in all the instantiated ot modules.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6
    Join Date
    Oct 2012
    Posts
    282
    Plugin Contributions
    0

    Default Re: Where do the OT classes get instantiated?

    thanks, yes i found those

 

 

Similar Threads

  1. Where do I get the category url?
    By skeeterz71 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 30 Mar 2014, 09:24 PM
  2. v138a Fedex removed the old API so anybody knows where to get the information?
    By icecold in forum Addon Shipping Modules
    Replies: 5
    Last Post: 1 Oct 2012, 04:34 PM
  3. Where's the classes folder??
    By elninomago in forum Installing on a Windows Server
    Replies: 6
    Last Post: 6 May 2010, 02:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg