Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2014
    Location
    Tucson, AZ
    Posts
    2
    Plugin Contributions
    0

    Default Need some debugging info/help

    Hi all,

    I'm new to ZenCart and to this forum, so let me know if I'm in the wrong place or breaking any rules.

    I'm a PHP developer who has just inherited a ZenCart site built by somebody else. And there's a problem. When orders are placed, the order amounts are correct but some of the products are missing from the invoice display and in the admin order notification. No customers have complained at this point, so I think the cart is displaying all the products.

    But when the system moves the products from the cart to the order tables, something's hinky. The main order record is written to the orders table, but only some of the products are written to the order_products table. This results in an invoice showing, for example, one product at $10.50, but a total invoice amount of $300.35.

    I've been looking through the includes\classes\order.php class and I think I've found the loop that processes the products array, but I can't figure out where that array is created.

    First of all, does this sound familiar to anybody? Also, can you point me to a line or another file where the products array is created? And finally, during shopping, is the cart ever committed to a data table or is it held only in session variables?

    Thanks in advance for your help.

  2. #2
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,732
    Plugin Contributions
    27

    Default Re: Need some debugging info/help

    Have you compared the files you've tracked down to a stock Zen Cart 1.39h? It sounds like an unfinished mod or someone overwriting the files.
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

  3. #3
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: Need some debugging info/help

    Quote Originally Posted by sgodwin View Post
    ...First of all, does this sound familiar to anybody?
    No, this is out of normal ZC behaviour.

    Quote Originally Posted by sgodwin View Post
    ...Also, can you point me to a line or another file where the products array is created?
    twitchtoo gave you the best advice: compare to a stock 1.3.9h install

    Quote Originally Posted by sgodwin View Post
    ...And finally, during shopping, is the cart ever committed to a data table or is it held only in session variables?
    Only stored in a table if the customer was logged in - it stays there until they actually check out or delete the items themselves. For not logged in customers (those who are just having a 'sniff') the cart contents is session based.

    Cheers / Frank

  4. #4
    Join Date
    Feb 2014
    Location
    Tucson, AZ
    Posts
    2
    Plugin Contributions
    0

    Default Re: Need some debugging info/help

    OK. I'll start comparing the files.

    I've been wondering about one of the "features" in this store - whether it was configured via some standard method, or if it was custom code from the previous developer. And your comments are making me lean more toward the bad custom code possibility!

    Thanks very much to both of you!

 

 

Similar Threads

  1. Need some help arranging my product info page
    By menappi in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 2 Jul 2012, 05:37 AM
  2. need some info about zen cart
    By tomence in forum General Questions
    Replies: 7
    Last Post: 8 Feb 2010, 12:25 PM

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