Page 1 of 2 12 LastLast
Results 1 to 10 of 20
  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
    9,690
    Plugin Contributions
    123

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

  4. #4
    Join Date
    Jun 2003
    Posts
    33,715
    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,373
    Blog Entries
    7
    Plugin Contributions
    274

    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.

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

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

    I'm using a mod on this website that is verified for version 1.5

    monthly_sales_and_tax_summary_report_1-4

    It isn't calculating my sales correctly.

    The amount of "deductions" aren't adding up to the correct amount.

    So what are you saying, go the other way? Make everything positive and then figure a solution from there.
    Last edited by DigitalShadow; 19 Jan 2012 at 12:23 AM.

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

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

    I switched to ver 1-3 as not on 1.5x

    Right, if I update all values to be positive, everything should be grand.

    Fix the edit/super orders problem with reward points and we are sorted.

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

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

    Can anyone help me with a piece of code that will ensure that all my current values are positive and the text values are formatted correctly to reflect - figures

    should it show

    -£15.75
    or
    £-15.75

 

 
Page 1 of 2 12 LastLast

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

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