Page 6 of 6 FirstFirst ... 456
Results 51 to 58 of 58
  1. #51
    Join Date
    Jun 2008
    Location
    Japan
    Posts
    123
    Plugin Contributions
    5

    Default Re: Different Total Displayed

    I saw, a little bit surprised that the PR was merged already. I tested it today and apart from the lost penny problem that is still here, when there is a tax applied on shipping, it is not displayed at all anymore, not in shipping cost (when displayed with tax), nor in tax total, nor in total cost.

    When merging my modification with this new ZC version, problem is identical, which makes me think it is coming from the code change on $tax_add handling in file order.php after line 860.

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

    Default Re: Different Total Displayed

    Quote Originally Posted by pilou2 View Post
    I saw, a little bit surprised that the PR was merged already. I tested it today and apart from the lost penny problem that is still here, when there is a tax applied on shipping, it is not displayed at all anymore, not in shipping cost (when displayed with tax), nor in tax total, nor in total cost.

    When merging my modification with this new ZC version, problem is identical, which makes me think it is coming from the code change on $tax_add handling in file order.php after line 860.
    @pilou2, the intent of merging that PR was to get a wider audience for testing, I agree that more changes are needed. I am traveling this weekend, so my response time will be slow, but my intent is to focus on the calculation issues that you and others identify as we get closer to a zc200 final release.

  3. #53
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,498
    Plugin Contributions
    88

    Default Re: Different Total Displayed

    Quote Originally Posted by pilou2 View Post
    I saw, a little bit surprised that the PR was merged already. I tested it today and apart from the lost penny problem that is still here, when there is a tax applied on shipping, it is not displayed at all anymore, not in shipping cost (when displayed with tax), nor in tax total, nor in total cost.

    When merging my modification with this new ZC version, problem is identical, which makes me think it is coming from the code change on $tax_add handling in file order.php after line 860.
    Would you supply the details of the associated "missing shipping tax" configuration? Please include
    - Prices including tax (true/false)
    - USD => JPY conversion factor (I'm pretty sure you're using 155 JPY/USD)
    - The shipping cost
    - Tax rate (I'm pretty sure you're using a 10% rate)

  4. #54
    Join Date
    Jun 2008
    Location
    Japan
    Posts
    123
    Plugin Contributions
    5

    Default Re: Different Total Displayed

    Quote Originally Posted by lat9 View Post
    Would you supply the details of the associated "missing shipping tax" configuration? Please include
    - Prices including tax (true/false)
    - USD => JPY conversion factor (I'm pretty sure you're using 155 JPY/USD)
    - The shipping cost
    - Tax rate (I'm pretty sure you're using a 10% rate)
    It won't be necessary, I found the problem and it has nothing to with new PR... For any reason, I set the flat rate module I use to a zone 'all countries' and 'all zones', which prevented it from displaying on shipping page. Next module (per item) has same description, same rate but was not set with tax and I was going through this page as quickly as possible...
    Stupid thing that made me loose few hours...
    Removing this zone setting fixed the shipping tax problem which was not really one. I used same data as before for prices, tax etc...
    Good news is the new PR code works perfectly (except the small penny loss).
    Bad news is that there is another bug with zones set to all countries or all zones.

  5. #55
    Join Date
    Jun 2008
    Location
    Japan
    Posts
    123
    Plugin Contributions
    5

    Default Re: Different Total Displayed

    Based on lat9 new PR, I did more testing and tried new code. I got a good 'penny loss' fix that works great on standard orders, no more differences between tax display or not, cart or final invoice. But this is not a final solution, lots need to be testing. Just for those who are interested in testing:
    https://github.com/piloujp/zencart/tree/The-Lost-Penny

    I am now working on discount coupon but have hard time understanding all options.
    My image of coupon is that they are a discounts (fix or percentage) that apply to what customers pay at the end as a deduction. Although there are some that apply only to some items. Validation can be pretty complicated, but Zen cart seems to do it very well.
    Where I start to get lost is when looking at 'Admin->Modules->Discount coupons', there are few options that I can't understand very well:

    'Include Shipping' in calculation.

    Probably used when checking if discount is higher than total, but I am not sure.

    'Include Tax' in calculation.

    Same as shipping?

    'Re-Calculate Tax'
    There are three options here:

    'None' is easy to understand, nothing is change, tax is as it was before discount.

    'Standard', I suppose tax is adjusted to new taxable total. It is pretty straight forward if there is only one tax class that apply to all item including shipping, then new tax should be tax rate x new total without tax. But it is not the case in ZC now, something is wrong in calculation. I did some test with 10% tax and a fix discount coupon, but tax displayed is never 10% of the new total without tax.

    'Credit Note', I am not sure what it is, but it is the one that gives results identical to 'none'.

    With 'standard' option set, tax calculation if off and final total too. Coupons seems to be treated as an item with price without tax and tax included, but when creating coupons there is only one price. It does not make sense to me to apply tax on coupons. How a shop owner can control what discount he does if tax is applied or not on a discount set in %? Plus a discount is money not paid, how can it be taxed?
    There might be some rounding error too, but before trying to fix it, I need to understand what is expected here.
    Please, if someone as some light to through on this I would really appreciate.
    Last edited by pilou2; 18 Mar 2024 at 09:40 AM.

  6. #56
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,498
    Plugin Contributions
    88

    Default Re: Different Total Displayed

    @pilou2, that ot_coupon.php code's tax handling (as you identified) is quite confusing and I fully expect that there will be follow-on penny-off errors with its use. If you find such issues, please open a new thread specifically for the coupon-handling so that this thread can keep track of only 'base' product/shipping tax issues.

  7. #57
    Join Date
    Nov 2023
    Location
    Hounslow
    Posts
    79
    Plugin Contributions
    0

    Default Re: Different Total Displayed

    Quote Originally Posted by lat9 View Post
    During the checkout, the subtotal calculation is performed within the order-class' cart method. The overall total and tax are further manipulated by the various order-total modules to produce the order's final tax and total.
    Hi,

    Sorry for asking on this but. I'm just at a point in making a payment plugin, and have looked a a few other one's and am getting a mixed view on 'order's final total' that's sent to payment gateway as some are using : "$amount_total=round($order->info['total']*$order->info['currency_value'],$decimal_places)*$multiplied_by;" but to me the amount sent to the payment gateway should just be "$order->info['total']" untouched by any sort of "$order->info['currency_value']" as this in my view is dealt with for cart total, am i right on this please?
    just to let you know what "$multiplied_by" is, the "presentment currencies - Zero-decimal currencies. Three-decimal currencies ..." which are needed before sending to the gateway.

    So if currency conversion is done at cart to order point then, this
    "$amount_total=round($order->info['total']*$order->info['currency_value'],$decimal_places)"
    is just making the amount to pay bigger by currency rate of the order and not matching the displaid amount in checkout before and after payment has been taken and shown on success page?

  8. #58
    Join Date
    Nov 2023
    Location
    Hounslow
    Posts
    79
    Plugin Contributions
    0

    Default Re: Different Total Displayed

    Quote Originally Posted by OJ_SIMON View Post
    Hi,

    Sorry for asking on this but. I'm just at a point in making a payment plugin, and have looked a a few other one's and am getting a mixed view on 'order's final total' that's sent to payment gateway as some are using : "$amount_total=round($order->info['total']*$order->info['currency_value'],$decimal_places)*$multiplied_by;" but to me the amount sent to the payment gateway should just be "$order->info['total']" untouched by any sort of "$order->info['currency_value']" as this in my view is dealt with for cart total, am i right on this please?
    just to let you know what "$multiplied_by" is, the "presentment currencies - Zero-decimal currencies. Three-decimal currencies ..." which are needed before sending to the gateway.

    So if currency conversion is done at cart to order point then, this
    "$amount_total=round($order->info['total']*$order->info['currency_value'],$decimal_places)"
    is just making the amount to pay bigger by currency rate of the order and not matching the displaid amount in checkout before and after payment has been taken and shown on success page?
    Hi,


    example of ""$amount_total=round($order->info['total']*$order->info['currency_value'],$decimal_places)*$multiplied_by;"" would be:


    main product of £100.00 (GBP (1.0)) and secount of USD (currency rate of say 10 (1.10) at cart it would be $110.00 then displayed in checkout as $110.00 but amount sent to gateway of $121.00 X 100 (decimalisation to 12100) which is wrong?

 

 
Page 6 of 6 FirstFirst ... 456

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