Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2008
    Posts
    2
    Plugin Contributions
    0

    Default Error: The totals of the cart item amounts do not match order amounts.

    Hi,

    We have a zen cart installation running; version 1.3.8, and we've been encountering problems with the Paypal Express Checkout module. Today we received an error claiming that 'The totals of the cart item amounts do not match order amounts'.

    Checking the log files this is indeed the case:

    Array
    (
    [ITEMAMT] => 81.50
    [HANDLINGAMT] => 6.00
    [SHIPPINGAMT] => 13.20
    [AMT] => 88.70
    ...

    The product in question has a number of attributes but only one affects the price. It is a dropdown list which provides a one-off cost, which in this case was £6.00. The actual ITEMAMT should be 75.50, so an extra £6 has been added here and £6 added as a HANDLINAMT as well. Can anyone help me resolve this please. Thanks for your time.

    Loz

  2. #2
    Join Date
    Mar 2008
    Posts
    2
    Plugin Contributions
    0

    Default Re: Error: The totals of the cart item amounts do not match order amounts.

    I think I've identified the problem. At line 1496 we find the code for adding one time charges to the passed amount

    // add all one-time charges
    $optionsST['ITEMAMT'] += $onetimeSum;

    As far as I can tell, in my case, the one time charge has already been included with the overall amount meaning it is being added again. Then when the code reaches line 1512 there is some code which attempts to balance any discrepancy between the item values its recorded and the total amount which has been passed:

    // subtotals have to add up to AMT
    // Thus, if there is a discrepancy, make adjustment to HANDLINGAMT:
    $st = $optionsST['ITEMAMT'] + $optionsST['TAXAMT'] + $optionsST['SHIPPINGAMT'] + $optionsST['HANDLINGAMT'];
    if ($st != $optionsST['AMT']) $optionsST['HANDLINGAMT'] += strval($optionsST['AMT'] - $st);

    If theses do not add up the difference is passed into HANDLINGAMT which in my case will be -6, which I'm guessing is read as 6 by paypal. Hence my overall differnce od £12.

    My solution has been to comment out $optionsST['ITEMAMT'] += $onetimeSum; which works at least for the erroneous transaction in my sandbox account. Does anyone know what problems this could potentially create? Its ugly but I'm thinking any problems here will be caught by the discrepancy code above. Any thoughts?

  3. #3
    Join Date
    Jan 2010
    Posts
    15
    Plugin Contributions
    0

    Default Re: Error: The totals of the cart item amounts do not match order amounts.

    For me works

    // $st = $optionsST['ITEMAMT'] + $optionsST['TAXAMT'] + $optionsST['SHIPPINGAMT'] + $optionsST['HANDLINGAMT'];

    $st = $optionsST['ITEMAMT'] + $optionsST['SHIPPINGAMT'] + $optionsST['HANDLINGAMT']; // Do nto count TAX is included in $optionsST['AMT']

    if ($st != $optionsST['AMT']) $optionsST['HANDLINGAMT'] += ($optionsST['AMT'] - $st);

 

 

Similar Threads

  1. Pending showing false order amounts
    By atl2rva in forum Managing Customers and Orders
    Replies: 1
    Last Post: 27 Aug 2010, 08:59 PM
  2. In need of shipping help, 3 different amounts for each item, nothing more..
    By Slipstream in forum Built-in Shipping and Payment Modules
    Replies: 6
    Last Post: 20 Apr 2010, 09:47 PM
  3. Need shipping help, 3 fixed amounts for each item.
    By Yzerman19 in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 17 Jun 2009, 04:44 PM
  4. Special / Saving Amounts not shown in Cart ?
    By renaissanceart in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 15 Dec 2008, 04:17 AM
  5. Field format error: 10413-The totals of the cart item amounts do not match
    By roscoeh in forum PayPal Website Payments Pro support
    Replies: 1
    Last Post: 14 Aug 2008, 10:19 PM

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