Page 3 of 3 FirstFirst 123
Results 21 to 30 of 30
  1. #21
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: Bizarre Tax calculation

    Quote Originally Posted by satphone View Post
    Surely getting coupons to work correctly is a pretty basic requirement???
    Actually, your requirements (and definition of correctly) are unusual. That's why the code doesn't accommodate the computation you are asking for.
    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.

  2. #22
    Join Date
    Jun 2014
    Location
    Australia
    Posts
    60
    Plugin Contributions
    0

    Default Re: Bizarre Tax calculation

    I'm not sure why you consider that unusual. Is it not normal to pay tax on the Total amount of an invoice?

    Without that ability it precludes the use of Zen Cart and coupons in Australia and New Zealand. I can't speak for other countries but I imagine there'd be many.

  3. #23
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: Bizarre Tax calculation

    I consider it unusual in that I have six years of experience supporting this platform with customers all around the world, including Australia and New Zealand, and your request is a first. Now who knows, maybe you're right and everyone else is wrong, but it's still a first.

    Zen Cart is an open source product, and you are welcome to customize it to your requirements.
    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. #24
    Join Date
    Jun 2014
    Location
    Australia
    Posts
    60
    Plugin Contributions
    0

    Default Re: Bizarre Tax calculation

    I really surprised at your posts. You don't seem willing or able to assist, and then claim my request for assistance to be "strange"

    It is VERY simple indeed. (You'd know this if you've set up stores correctly in AU and NZ.)

    The sales tax component (we call it GST) should be calculated on the final value of the purchase being made. eg.

    Goods $100, shipping $20, discount (for whatever reason) -$10. This should result in a sale value of $110 where it should be indicated that $10 of the final sale value is tax/GST

    Zen Cart 1.5.1 does not manage to do that. It is not strange to want it to do that, in fact it NEEDS to be able to do that to be useable in AU / NZ.

    Can you perhaps explain what is needed to make it do this. That is what I requested in my first post.

    Pointing out that I am free to modify Zen Cart really is not helping. Everyone knows that as it is open source software.

    Can anybody help in getting Zen Cart to do these simple calculations correctly?

    Thanks in advance - Kev

  5. #25
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Bizarre Tax calculation

    Quote Originally Posted by satphone View Post
    Rod - here's what I've got
    Now here's what it calculates

    Sub-Total: $95
    Flat Rate (Best Way): $10.00
    Discount Coupon: 10 : -$10.00
    GST 10%: $8.55
    TOTAL: $95.00

    Whilst the Total is correct the GST is just whacky. It should be $95/11 = $8.64

    So it seems the cart is calculating the discount amount as $10.91 and deducting that. This makes the calculated GST correct IF the coupon was $10.91
    Your right, that is whacky. I wonder why I'm not getting the same results? I don't recall having to modify the code at all, but it is giving the expected results on the clients' store (I wonder if he modded it?).

    I'll try to find some time to replicate these settings and product costs on one of my local test sites later this evening. I'll let you know what I find.

    Cheers
    RodG

  6. #26
    Join Date
    Jun 2014
    Location
    Australia
    Posts
    60
    Plugin Contributions
    0

    Default Re: Bizarre Tax calculation

    Much appreciated. My accountant is going nuts!

  7. #27
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Bizarre Tax calculation

    Quote Originally Posted by satphone View Post
    Much appreciated. My accountant is going nuts!
    Not the only one. Me too.

    I couldn't make much sense of the code on the site that was using the 'credit note' setting. The code has been hacked almost beyond recognition, SO, I went back to my notes and the code that used the 'Standard' setting for Re-calculate tax and discovered that this was behaving the way you've described.

    I then compared the current ot_coupon code with a copy from an older (also live) server that I have access to (and knew worked as expected) and noticed a minor, but very important difference. I made the same change to the current code, and am now getting the expected results. Hooray!!!

    The change:
    /includes/modules.order_total/ot_coupon.php

    Line #457 ... which reads like..
    $od_amount['tax'] += $od_amount['tax_groups'][$key];

    Just add a couple of slashes // in front of the line to comment it out. (you can also just delete the line, but I prefer to comment out because it may come in handy someday, as it did this time).

    Save the file, and all should work as expected. (settings, include tax = false, Re-calculate tax - standard)

    Cheers
    RodG

  8. #28
    Join Date
    Jun 2014
    Location
    Australia
    Posts
    60
    Plugin Contributions
    0

    Default Re: Bizarre Tax calculation

    WooHooo! That did it!

    Sorry for the delay in getting back to you - I had a mob install SEO URL rewrites for me. They busted the shop and I had to restore from backup. Naturally this meant it broke other add ons, but just about got it fixed now.

    I have NO idea whatsoever how you found this bug in all that code. But very well done indeed Sir!

    Thanks again.

  9. #29
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Bizarre Tax calculation

    Quote Originally Posted by satphone View Post
    WooHooo! That did it!
    Thanks for letting me/us know that it fixed the problem. Much appreciated.

    Quote Originally Posted by satphone View Post
    Sorry for the delay in getting back to you - I had a mob install SEO URL rewrites for me.
    I'm sorry to hear that. ZenCart gets indexed quite nicely without "SEO" rewrites, and as a general rule they cause far more problems than the thing they are meant to solve. I do all I can to discourage my clients from using them.

    Quote Originally Posted by satphone View Post
    I have NO idea whatsoever how you found this bug in all that code. But very well done indeed Sir!
    A couple of decades of coding experience, and several years of working with Zen-Cart helped a lot. :)

    Cheers
    RodG

  10. #30
    Join Date
    Jun 2014
    Location
    Australia
    Posts
    60
    Plugin Contributions
    0

    Default Re: Bizarre Tax calculation

    Quote Originally Posted by RodG View Post

    A couple of decades of coding experience, and several years of working with Zen-Cart helped a lot. :)
    I figured it didn't happen without considerable depth of experience. As far as the SEO goes I was reluctant to do it figuring it could make things "fragile" - and it did.

    But not getting anywhere in Google rankings despite good content, good tags etc, cross linking in social media etc after 3 months it was time to try something.

    Usually adwords relevance should be an indicator of rankability (whole site in near 10/10) but just not getting there in organic ranks.

 

 
Page 3 of 3 FirstFirst 123

Similar Threads

  1. Bizarre Tax behaviour.
    By rpain in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 0
    Last Post: 6 Jan 2011, 06:12 PM
  2. Problem with tax calculation on Tax Exempt goods
    By vickula in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 3
    Last Post: 25 Mar 2009, 03:49 PM
  3. Replies: 0
    Last Post: 13 Jun 2008, 12:57 PM
  4. No Tax Calculation...
    By Alex Clarke in forum General Questions
    Replies: 4
    Last Post: 20 Feb 2008, 01:10 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