Page 3 of 6 FirstFirst 12345 ... LastLast
Results 21 to 30 of 58
  1. #21
    Join Date
    Nov 2006
    Posts
    108
    Plugin Contributions
    0

    Default Re: Different Total Displayed

    Quote Originally Posted by lat9 View Post
    @todonada, have you tested to see if the code in the current GitHub master branch (https://github.com/zencart/zencart) corrects this issue? I'm pretty sure that this was one of the test cases I used when making those pricing-calculation updates.
    Sorry for the late reply!

    I applied the changes described here
    https://github.com/lat9/zencart/comm...44631fc0b06cba
    and here
    https://github.com/zencart/zencart/pull/6141/files

    So far everything seems to work fine and the problem from the initial post is solved thanks to your code changes.

  2. #22
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,510
    Plugin Contributions
    88

    Default Re: Different Total Displayed

    Quote Originally Posted by todoonada View Post
    Sorry for the late reply!

    I applied the changes described here
    https://github.com/lat9/zencart/comm...44631fc0b06cba
    and here
    https://github.com/zencart/zencart/pull/6141/files

    So far everything seems to work fine and the problem from the initial post is solved thanks to your code changes.
    Thanks to you, @todoonada! I appreciate the 3rd-party verification as well as your original posting of the issue.

  3. #23
    Join Date
    Nov 2006
    Posts
    108
    Plugin Contributions
    0

    Default Re: Different Total Displayed

    Hello lat9,
    I have one more question.
    Currently a tax of 173.6363 is rounded to 173. (I have no decimals in the currency).
    I would like to have it rounded to 174 (half round up method).
    In the sense of "Total is 1910, a 10% tax of 174 is included".
    Now it displays 173 instead of 174.

    Where do I have to change your code?

  4. #24
    Join Date
    Nov 2006
    Posts
    108
    Plugin Contributions
    0

    Default Re: Different Total Displayed

    I went to includes/modules/order_total/ot_tax.php
    and changed line 98 from
    Code:
    'text' => $currencies->format($taxValue, true, $order->info['currency'], $order->info['currency_value']),
    to
    Code:
    'text' => $taxValue,
    Now on the front end the 10% tax is displayed as 173.3. Round this and it is 173 of course.
    The value of 173.3 is not correctly. It should be 173.6.
    So it seems it is not the wrong rounding method, but the calculation of $taxValue is off.

  5. #25
    Join Date
    Nov 2006
    Posts
    108
    Plugin Contributions
    0

    Default Re: Different Total Displayed

    Sorry, some further information:

    a) If I have a product price of 8280 and no shipping costs, the tax is displayed correctly as 753.
    b) If I have a product price of 8280 and shipping costs of 910 (total of 9190), the tax is displayed as 836, it should be 835.
    c) If I change the product price to 9190 (same like total in above) and free shipping, the tax is displayed correctly 835.

    So it seems there is something wrong with the tax calculation of the shipping costs.

  6. #26
    Join Date
    Apr 2008
    Location
    Qld, Australia
    Posts
    257
    Plugin Contributions
    6

    Default Different Total Displayed for currency change

    Versions affected: zc158a with patches and zc200
    file /includes/classes/order.php

    Issue: currency conversion applied on item price in shopping_cart and reapplied on the sub-total for checkout_payment.

    I updated /includes/classes/order.php to include changes from #6094 and #6141 to correct tax calculations.
    Prices are displayed including tax. Most orders are for domestic orders so they include tax. When the delivery address is overseas the items become tax exempt. This is determined by zones.


    Now with the new code:

    • user selects a currency eg Euro and creates an account with a delivery address outside Australia.
    • The currency conversion is applied on the item:
    • item cost in AUD ex tax = $118.77 converted to EUR = €73.58 [ conversion rate of 0.61948508] = result is OK
    • in checkout shipping, postage is calculated and returned in Euro = result is OK
    • in checkout payment, the sub-total before postage is now €45.93 = INCORRECT [ this is the items price in EURO reconverted to EURO by the same conversion factor ]
    OldNGrey
    ZC158a PHP 8.2.15
    MySQL 10.6.16-MariaDB

  7. #27
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,510
    Plugin Contributions
    88

    Default Re: Different Total Displayed for currency change

    Thanks for the details, OldNGrey. Once I've coffeed-up, I'll take a look on zc200-rc1 and report back.

  8. #28
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,510
    Plugin Contributions
    88

    Default Re: Different Total Displayed for currency change

    OldNGrey, what's the full (with 4 decimal digits) price recorded in the database for that 118.77 product?

  9. #29
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,510
    Plugin Contributions
    88

    Default Re: Different Total Displayed

    Quote Originally Posted by todoonada View Post
    Sorry, some further information:

    a) If I have a product price of 8280 and no shipping costs, the tax is displayed correctly as 753.
    b) If I have a product price of 8280 and shipping costs of 910 (total of 9190), the tax is displayed as 836, it should be 835.
    c) If I change the product price to 9190 (same like total in above) and free shipping, the tax is displayed correctly 835.

    So it seems there is something wrong with the tax calculation of the shipping costs.
    @todoonada, I'll be looking at this as well using the zc200-rc1 code.

  10. #30
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,510
    Plugin Contributions
    88

    Default Re: Different Total Displayed

    Zen Cart issue created to track the correction(s) for the above two pricing issues: https://github.com/zencart/zencart/issues/6318

 

 
Page 3 of 6 FirstFirst 12345 ... LastLast

Similar Threads

  1. Replies: 5
    Last Post: 3 Apr 2020, 07:53 PM
  2. v151 Site that displayed different templates.
    By Malaperth in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 3 Feb 2014, 07:38 PM
  3. v151 order total different from cart total
    By s_p_ike in forum Bug Reports
    Replies: 9
    Last Post: 9 Dec 2012, 09:29 AM
  4. Different Product Listing styles displayed
    By skelly100 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 31 Dec 2009, 11:33 PM
  5. Free shipping for Different sales total for different zones
    By francesca_ph in forum Built-in Shipping and Payment Modules
    Replies: 20
    Last Post: 30 Dec 2008, 05:43 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