Post by Blueforce » Sat Feb 21, 2009 11:37 pm

Hi,

I don't know if it's a bug but I have problem with the calculations of order totals.

- The shipping tax don't get added to the total tax amount.
- If I add a Cupong the final total is fine, but the tax don't get re-calculated.

To have a valid invoice we must include a tax specification.
I use 1.1.8 version and I have tried all possible configurations that i can think of regarding tax, zones and so on. Maybe it's me doing something wrong here but I can't find a solution to this.

If any of you guys have a idea on how tog get this working, Please let me know what to do... Thanks!

Regards,
Leffe

New member

Posts

Joined
Thu Feb 12, 2009 7:11 am
Location - Sweden

Post by mal-schauen » Sun Feb 22, 2009 1:08 am

I have the same Problem with the 1.1.8 Version. In an other Post i had include this question and i hope it will be sucessful resolved.

Here go to may Post

User avatar
Moderator

Posts

Joined
Sun Feb 08, 2009 11:16 pm
Location - Germany

Post by Blueforce » Sun Feb 22, 2009 7:16 pm

Hi there!

It looks like this IS a bug, because other people have reported the same thing.
Hopefully Daniel (or someone else) find a sollution to it soon, because I really like the job he has done on the 1.x.x version.

I don't mind some bugs here and there.... I think there allways are in new releases!
This bug effects the main function of a cart software (in my opinion) so hopefully Daniel give this bug high priority.

Best regards,
Leffe

New member

Posts

Joined
Thu Feb 12, 2009 7:11 am
Location - Sweden

Post by mal-schauen » Sun Feb 22, 2009 7:40 pm

This bug effects the main function of a cart software (in my opinion) so hopefully Daniel give this bug high priority.
Since I am quite of your opinion

Here you can find other posts about this question.

post 1 -> click here
post 2 -> click here

User avatar
Moderator

Posts

Joined
Sun Feb 08, 2009 11:16 pm
Location - Germany

Post by Blueforce » Sun Feb 22, 2009 10:57 pm

Hi,

Does the calculations work in verison 0.7.9 ?? If so I'm thinking of maybe using that version instead.
I have a few online stores using osCommerce (heavily modefied) today and I want to switch over to use OpenCart instead. I was in the midst of migrating all data and designing the stores when I noticed that the order calulations didn't work.

The stores only use the basic functions which is included in OpenCart 1.x so I started the migation as soon as I saw the release of OpenCart 1.x version, and as always... I'm in a rather tight timeframe!

Do you other guys have any sugestions of what I should do? I really like the 1.x version and it has all the features my stores require, and it's a "fresh", nice and new cart!!! Which still has a bug making the cart "useless" to me at this point... Don't missunderstand me here!! OpenCart is in my opinion the best cart and all respect to Daniel who has made a outstanding work developing and designing this fine cart!
What I mean is - Should I wait for a bux-fix for the order calculation?? Or... should I use version 0.7.9??

What do you guys think? - I really would apreciate your thoughts!
And as I said before - I'm in a tight timeframe and I also have the main part of the store designs for 1.x ready.

Regards,
Leffe

New member

Posts

Joined
Thu Feb 12, 2009 7:11 am
Location - Sweden

Post by CChris » Sun Feb 22, 2009 11:11 pm

Yes - there are two bugs when using a coupon...

the first is a problem, that the coupon-name is not shown, instead there is a placeholder / the name of the variable and the other is the empty 0,00 Position

Sub-Total: €249.90
Coupon (Free Shipping): -€3.57
coupon_title -€24.99
Per Item Shipping Rate: €3.57
VAT 19.0%: €39.90
: €0.00
Total: €232.05

New member

Posts

Joined
Tue Feb 10, 2009 8:36 am

Post by Blueforce » Sun Feb 22, 2009 11:22 pm

Hi CChris,

Yes I agree, but there still are 2 bigger issues.
1. the shipping tax (VAT) don't get included in the total tax (VAT)
2. When using a coupon the tax (VAT) don't get recalculated - It's still the same value as before I added the coupon.

And our invoices reguire (by law) that the total tax (VAT) is specified.

Regards,
Leffe

New member

Posts

Joined
Thu Feb 12, 2009 7:11 am
Location - Sweden

Post by Blueforce » Sun Feb 22, 2009 11:29 pm

Oh, I forgott...

In your example you have the coupon as free shipping. But if you use a coupon based on percentage or a amount the tax gets wrong, and the tax on the shippning don't get added.

Regards,
Leffe

New member

Posts

Joined
Thu Feb 12, 2009 7:11 am
Location - Sweden

Post by Qphoria » Sun Feb 22, 2009 11:50 pm

I did some extensive research and fixes to the 0.7.9 calculations section for tax and coupons. Take a look at some of the major progress points:

defining the problem: http://code.google.com/p/open-cart/issu ... =coupon#c6
researching the law: http://code.google.com/p/open-cart/issu ... coupon#c10
the solution: http://code.google.com/p/open-cart/issu ... coupon#c20

User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Blueforce » Mon Feb 23, 2009 12:21 am

Hi Qphoria,

Thanks for your reply!

But fist a message to CCHris:
Regarding the coupon-name is not shown, I think you shuld edit your language file.
catalog/language/YOUR LANGUAGE/total/coupon.php
And change:
$_['text_title'] = '%s:';
to
$_['coupon_title'] = '%s:';
that should do the trick.

Ok back to you Qphoria...
As I see it the problem is solved in 0.7.9 - or am I wrong?

In sweden we must add a discount BEFORE we add the VAT. And to make things more complicated we also have 3 different taxes, 25% (the normal tax), 12% and 6% and all taxes has to be specified separatly!!!

But in the most cases the tax is 25%, this also aplies to shipping, and other fees that we have, like when sending somethiong using COD, our postal service add a fee for this service on top of the shipping cost, this fee also use 25% VAT and has to be specified in the total VAT.

So... bottom line... shall I use OpenCart 1.x or 0.x ??

Regards,
Leffe

New member

Posts

Joined
Thu Feb 12, 2009 7:11 am
Location - Sweden

Post by Qphoria » Mon Feb 23, 2009 12:38 am

my brain hurts :)
I would say, try OpenCart Zero and see if it works the way you want it.

User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Blueforce » Mon Feb 23, 2009 1:01 am

Hehe....
Thanks Qphoria!

I was kinda´afraid you shold say that! *s*

The only "downside" is that we have a cutomer that already have got the 1.x version, and he is working on the back end adding all his products, and I have a deadline by midnight when his shop shall be online!!!... hmmm
And with all MY luck I guess I can't use the templates from 1.x in 0.x. But the most "painfull" thing is calling him and telling him - "You have to do everything all over again".... Ok, I wasn't serious here, I guess I can export the product data and then "re arrange" the data to fit the 0.x SQL layout.

But if I just could get the shipping tax added to the total tax amount I would be in the clear for now!

I have been loking at the core files to try to figure out the program/data "flow"... but haven't gotten it yet.... I will give it another try and hopefully I find it, otherwise I will jump to v 0.x and give it a try!

Treat your brain right... dont think to hard! ;D

Regards,
Leffe

New member

Posts

Joined
Thu Feb 12, 2009 7:11 am
Location - Sweden

Post by Qphoria » Mon Feb 23, 2009 1:24 am

Well i'm just saying that if it IS the right way in 0.x, you can make a bug report for 1.x and maybe daniel will fix it here. But as far as I know it is right in 0.x, but I only really now USA laws so I'm not sure if every calculation is exactly the way you want it. So if you try it in 0.x, you could tell us

User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Daniel » Mon Feb 23, 2009 1:37 am

There are bugs in both version 1.x and 0.x and I'm fixing and releasing new versions on a near daily basis. I have to investigate this bug to before I can fix it.

I don't think 0.x is releasing new versions nearly everday.

User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by Blueforce » Mon Feb 23, 2009 2:19 am

Hi Daniel,

Thanks for your reply!

I actually prefer to stick with the 1.x - I totally love this cart!
And I agree that bugs get fixed quickly by you!

Please don't take this post/thread as criticism... because it's not!
You have all my respect for the work and time you put in to OpenCart!

As I said we have several osC carts running and they will all be upgraded to OpenCart shortly.
The only reason why I'm a bit eager on this calculation matter is that I introduced OpenCart to a customer and he just said "must have", so I made a few test runs of the 1.x version... and decided that it was stable enough and had all features he needed "as is". so I installed it for him.
I think I can find a "work around" for the calculations for the time beeing.

Best regards,
Leffe

New member

Posts

Joined
Thu Feb 12, 2009 7:11 am
Location - Sweden

Post by Daniel » Mon Feb 23, 2009 2:52 am

The coupon bug is new and all you need to do is change $coupon_title to $text_title in the total/coupon folder.

As for the shipping tax are you sure you set tax class on the shipping module and also set the location of your store in a tax zone.

I'm going to do some testing tonight and hopefully release a new version tomorrow.

This product is a starting point for developers and web development companies. I'm not going to hold peoples hand in creaing sites for their clients. If you are a PHP developer you should be able to fix these bugs your self and post the solution in the forums.

User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by CChris » Mon Feb 23, 2009 3:15 am

yep - the thing with the lang-var is not a problem for me - but it's a fact, that should be done with one of the next releases - because there are also users, who doesn't have a look into the source ;)

For this case i'll reporting everything i can find :D

New member

Posts

Joined
Tue Feb 10, 2009 8:36 am

Post by Qphoria » Mon Feb 23, 2009 3:40 am

Daniel wrote:There are bugs in both version 1.x and 0.x and I'm fixing and releasing new versions on a near daily basis. I have to investigate this bug to before I can fix it.

I don't think 0.x is releasing new versions nearly everday.
We already did all this "daily bug fix" stuff for 0.x over the past 6 months I guess.. There are no more bugs to fix, that was the point. This issue has yet to be proven a bug in 0.x since my fix

-EDIT-
Doing some further testing with 0.x

I have a product in my cart that costs : $23.26
I have shipping rate of: $8.56
I have a tax rate of 7.5%
I have tax class enabled for both the product and the shipping.

So the product should have 7.5% tax applied
and the shipping should have 7.5% tax applied

Product + tax: $23.26 * 0.075 = +$1.75 = $25.00
Shipping + tax: $8.56 * 0.075 = +$0.64 = $9.20

$25.00 + $9.20 = $34.20

Now, based on the fix here, coupon discounts are taken on the products BEFORE tax is included. So if I add a 10% coupon to this order, it will take the 10% off of the products ONLY

$23.26 * 0.10 = $2.33 = $20.93 would be the new product price. The rest of the prices would then fall in line:

Product + tax: $20.93 * 0.075 = +$1.57 = $22.50
Shipping + tax: $8.56 * 0.075 = +$0.64 = $9.20
29.49
$22.50 + $9.20 = $31.70

However, the price in 0.x shows $31.87.
This is because the tax is not recalculating on the price - coupon. It is still calculating the tax on the full product price.

So from the original post. The first bug is NOT in 0.x
But the second bug IS in 0.x. I will enter in a report.

User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Blueforce » Mon Feb 23, 2009 7:24 am

Hi Daniel and Qphoria

Daniel:
I have checked and re-checked all zones and classes and they are just fine.
This product is a starting point for developers and web development companies. I'm not going to hold peoples hand in creaing sites for their clients. If you are a PHP developer you should be able to fix these bugs your self and post the solution in the forums.
I have never asked for you to "hold peoples hand in creaing sites for their clients" in any way! but if you somehow have got that feeling, then I apologize, that has never been my intention or suggestion.
And I also have reported issues and also suggested fixes for them. And since this is a "Bug Reports" area of the forum I reported the tax calculation bug, so you and others get aware om them.

Qphoria:
Right on! - Thats exactly how the calculation for taxes and coupons should be done, anyway for my requirements.

Regards,
Leffe

New member

Posts

Joined
Thu Feb 12, 2009 7:11 am
Location - Sweden

Post by Daniel » Mon Feb 23, 2009 8:09 am

Blueforce wrote:Hi Daniel and Qphoria

Daniel:
I have checked and re-checked all zones and classes and they are just fine.
This product is a starting point for developers and web development companies. I'm not going to hold peoples hand in creaing sites for their clients. If you are a PHP developer you should be able to fix these bugs your self and post the solution in the forums.
I have never asked for you to "hold peoples hand in creaing sites for their clients" in any way! but if you somehow have got that feeling, then I apologize, that has never been my intention or suggestion.
And I also have reported issues and also suggested fixes for them. And since this is a "Bug Reports" area of the forum I reported the tax calculation bug, so you and others get aware om them.

Qphoria:
Right on! - Thats exactly how the calculation for taxes and coupons should be done, anyway for my requirements.

Regards,
Leffe
I'm sorry I only saw this part of the post after breifly looking what you said:

Which still has a bug making the cart "useless" to me at this point...

User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm
Who is online

Users browsing this forum: No registered users and 9 guests