Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2009
    Posts
    169
    Plugin Contributions
    2

    Default Hi...some advice please...

    Hi there,

    I'm busy with some slight modifications...

    Can anyone tell me what the following lines of code are used for?
    in catalog/includes/classes/order.php

    Line 917:

    // update totals counters
    $this->total_weight += ($this->products[$i]['qty'] * $this->products[$i]['weight']);
    $this->total_tax += zen_calculate_tax($total_products_price * $this->products[$i]['qty'], $products_tax);
    $this->total_cost += $total_products_price;

    $this->notify('NOTIFY_ORDER_PROCESSING_ONE_TIME_CHARGES_BEGIN', $i);

    I used Deveopers Toolkit to see if I can find any references to any of these variables/defines...but I can't pick up anything...

    Any help would be much loved thank you :)

  2. #2
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Hi...some advice please...

    These variables are used to total up each of the respective values: weight, tax, total cost, and then the "constant" is actually a notifier that is used to observe the data and take action if so desired.

    As far as finding these things using the DTK, you would want to search on things like: total_weight, total_tax, or total_cost...

    The constant is not likely to be found elsewhere in default ZC code because the code is written to operate mostly by direct flow.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Mar 2009
    Posts
    169
    Plugin Contributions
    2

    Default Re: Hi...some advice please...

    Hi mc12345678,

    ah I see now...thanks so much!

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Hi...some advice please...

    Quote Originally Posted by mc12345678 View Post
    These variables are used to total up each of the respective values: weight, tax, total cost, and then the "constant" is actually a notifier that is used to observe the data and take action if so desired.

    As far as finding these things using the DTK, you would want to search on things like: total_weight, total_tax, or total_cost...

    The constant is not likely to be found elsewhere in default ZC code because the code is written to operate mostly by direct flow.
    Actually, it's not a constant. It's just a string. We happen to have embraced the use of uppercase letters when naming notifier hooks; but they're not actually constants even though they look like them.
    .

    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.

  5. #5
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: Hi...some advice please...

    Indeed, you can tell they are not constants since they are quoted. They're just string values.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

 

 

Similar Threads

  1. Complete newbie in need of some advice please
    By snarfy in forum General Questions
    Replies: 8
    Last Post: 18 Apr 2008, 10:59 PM
  2. Hi Can I Have Some Advice Please
    By hells1614 in forum Installing on a Windows Server
    Replies: 8
    Last Post: 9 Apr 2008, 12:47 PM
  3. Need some advice please - logo
    By kellbell in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 26 Feb 2007, 02:31 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR