Results 1 to 10 of 20

Hybrid View

  1. #1
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Negative values in order total. Edit Orders Problem

    In orders_total the ot_group_pricing class shows values as positive, this results in the wrong values being shown in edit orders.

    Can someone write me some sql code that will enable me to change all positive 'value' where 'class' = ot_group_pricing in orders_total as doing 898 one by one would be just too much!

  2. #2
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Negative values in order total

    Is it possible to modify the code so that any negative values, i.e. group pricing or reward points are stored as negative values in the ordertotals database table?

  3. #3
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,513
    Plugin Contributions
    126

    Default Re: Negative values in order total

    You're going to have to do a database query to fix the values you already have. If someone doesn't post it before I get home I'll post it then.

    For the code change to prevent future problems, here are the instructions.

    http://thecartblog.com/2009/12/21/ze...counting-mods/

    I notice that Edit Orders 3.0 has this problem partially fixed; I'll fix that at some point this month.
    That Software Guy. My Store: Zen Cart Support
    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.

  4. #4
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default Re: Negative values in order total. Edit Orders Problem

    Moderator's note: thread moved to the appropriate forum.
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  5. #5
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Re: Negative values in order total

    I have latest version of edit orders.

    I use reward points and group discount, these need to be stored as negative values in the order_totals table so that my exporting of sales data is shown correctly

  6. #6
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Re: Negative values in order total

    This isn't an edit orders problem, as a fresh order stores the values as positive before I even look at the order. (checked in the database)

  7. #7
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Negative values in order total. Edit Orders Problem

    Right. It's your order export routine which needs improvement.

    Zen Cart's architecture stores the 'value' field without a minus sign, because it knows that the line item is a negative amount based on the order total module used for that line item.

    If you want to rewrite the core code to work entirely differently just so you don't need to change your export process, feel free.

    If you go changing existing data then all your order details will show up incorrectly for your customers and in your admin panel.

    Maybe you should change your export approach?
    .

    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.

 

 

Similar Threads

  1. Replies: 2
    Last Post: 8 Apr 2015, 01:23 PM
  2. v139h Edit Order Total Headings
    By SethF in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 8 Apr 2012, 09:02 PM
  3. Replies: 2
    Last Post: 23 Jul 2009, 12:59 AM
  4. Edit Order drops tax of sub total?
    By Gonzon in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 14 Jan 2008, 12:24 PM
  5. Table Rate Calculation Problems with Negative values
    By matt123 in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 15 Dec 2007, 06:28 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