Forums / Bug Reports / Coupons, some bugs?

Coupons, some bugs?

Started by rued on 3 Nov 2010, 7:48 PM · Views: 11,116

Results 41 to 60 of 60
23 Nov 2010, 6:30 PM
#41
rued avatar

rued

Zen Follower

Join Date:
Oct 2005
Location:
Finland
Posts:
186
Plugin Contributions:
0

Coupons, some bugs?

DrByte:

How did the code fix work for your rounding concerns?

Just tested it now, and it works fine for the test scenario mentioned earlier in tread. :clap:

Now we just have to confirm the other fix mentioned in my last post, or find another way. :bigups:

30 Nov 2010, 10:17 PM
#43
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Coupons, some bugs?

I don't follow you. That's a link to a matter that was addressed in v1.3.9 already.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

1 Dec 2010, 8:15 AM
#44
rued avatar

rued

Zen Follower

Join Date:
Oct 2005
Location:
Finland
Posts:
186
Plugin Contributions:
0

Re: Coupons, some bugs?

It's marked as it was, but seems like it's has been reverted/changed at some point since the bugs are back again. Found also more posts like this, also some about rounding issues.

Just found it weird. No need to follow. ;)

Anyhow, seems to me it could be wise to make more notes in the code. To avoid reverting fixes etc.

Btw! Have you looked at my fix on in last post on previous site?
Also that fix in post linked to above seems to cover it, but it's not fully in 1.3.9h, in ot modules.

15 Apr 2011, 10:58 AM
#45
rued avatar

rued

Zen Follower

Join Date:
Oct 2005
Location:
Finland
Posts:
186
Plugin Contributions:
0

Re: Coupons, some bugs?

Don't know if there is any progress done one all the rounding and calculation issues, since the dev repos is closed for public, but have done some new tests on a new fresh 1.3.9h ...

  • New Zen Cart 1.3.9h installation

  • Uploaded Norwegian language pack

  • Installed SQL Patch (attached) to localize some values

  • Changed sort order for ot_tax to 998

  • Added a test category

  • Added a test product with Tax Class 'Høy sats 25%' and price '104' (ex tax) + a stock value.

  • Added a Discount Coupon 'TEST' with 15% off

  • Done config, now of for shopping.

  • Add 3 x Test Product to Cart

  • Checkout Using 'Check/Money Order' and Coupon Code 'TEST'

  • Checkout will then display:
    Totalt produkter: NOK390,-
    Flat takst (Fastpris): NOK68,-
    Rabattkoder: TEST : -NOK56,-
    25% MVA er inkl. med: NOK80,-
    Total ordresum: NOK402,-

Now, how can the discount be 56 – where did that number come from?

390 x 15 / 100 = 58,50 so it should display 59 …?!

If removing tax from product total you'll get:
312 x 15 / 100 = 46,80

If changing config in ot_coupon to Include Tax 'true' and Re-calculate Tax 'None' you'll get a discount of 70 …

Re-calculate Tax should btw be set to 'None' in ot_coupon, in order to show the correct tax amount of 92 in the example above.

15 Apr 2011, 11:34 AM
#46
rued avatar

rued

Zen Follower

Join Date:
Oct 2005
Location:
Finland
Posts:
186
Plugin Contributions:
0

Re: Coupons, some bugs?

Regarding the overall rounding issues it's seems like the issue is that ALL calculation is based on values with decimals, even if no decimals is used/showed.

It's even stored with decimals in the order_total table, and that's an issue from my point of view. Also if integrating the store to an accounting system, you need to do rounding of the values pulled out of the database in order to get the same amount in both systems.

18 Apr 2011, 2:04 PM
#47
rued avatar

rued

Zen Follower

Join Date:
Oct 2005
Location:
Finland
Posts:
186
Plugin Contributions:
0

Re: Coupons, some bugs?

Gift Card - ot_gv

This module is installed: true
Sort Order: 840
Queue Purchases: true
Include Shipping: true
Include Tax: true
Re-calculate Tax: None
Tax Class: --none--
Credit including Tax: false
Set Order Status: standard

Products: 650
Shipping: 68
Fee: 69
Gift Card: - 100
25% Tax: 144
Total: 687

650 + 68 + 69 = 787
787 – 100 = 687 – Total is fine :)

687 / 1.25 = 549,6
687 – 549,6 = 137,4 – Tax is NOT fine :(

How did you get 144 ??

10 Jun 2011, 1:48 AM
#50
wilt avatar

wilt

Oji-san

Join Date:
Jun 2003
Location:
Newcastle UK
Posts:
1,940
Plugin Contributions:
3

Re: Coupons, some bugs?

In your coupon example above, what tax rate do you have applied to the Shipping.

28 Jul 2011, 8:24 PM
#52
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Coupons, some bugs?

Resolved in v1.5.0BETA

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

29 Jul 2011, 7:11 AM
#53
rued avatar

rued

Zen Follower

Join Date:
Oct 2005
Location:
Finland
Posts:
186
Plugin Contributions:
0

Re: Coupons, some bugs?

Great, will test and also update translations shortly.

Also just bought you quite many cups of coffee now, so you can keep up all your good work now in these stressful days to come. :cool:

2 Aug 2011, 5:45 PM
#54
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Coupons, some bugs?

Hopefully the stress won't be too crazy

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

17 Jan 2012, 3:32 PM
#55
thieving_gypsy avatar

thieving_gypsy

New Zenner

Join Date:
May 2006
Posts:
87
Plugin Contributions:
0

Re: Coupons, some bugs?

I've got discount coupon problems with tax too - if these issues are fixed in 1.5, is the order total coupon module backwards compatible with 1.3.9h?

17 Jan 2012, 3:58 PM
#57
thieving_gypsy avatar

thieving_gypsy

New Zenner

Join Date:
May 2006
Posts:
87
Plugin Contributions:
0

Re: Coupons, some bugs?

Of course I understand that but I'm thnking of a quick fix while we plan the upgrade.

17 Jan 2012, 4:35 PM
#58
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Coupons, some bugs?

Thieving_Gypsy:

I've got discount coupon problems with tax too - if these issues are fixed in 1.5, is the order total coupon module backwards compatible with 1.3.9h?
No, it's not a simple backport. Many more files are involved than just coupon order totals.
A proper upgrade is the correct solution.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

3 Feb 2012, 1:48 PM
#59
gomlers avatar

gomlers

Zen Follower

Join Date:
Aug 2008
Posts:
139
Plugin Contributions:
0

Re: Coupons, some bugs?

Zen Cart is great in so many ways, but I wish it was easier to update the cart, when mods are installed. Zen cart works OK out of the box, but to make it work GREAT some mods really are needed. e.g. the checkout system, credit note-system and a few other things.

I've spent more than a year to complete my cart the way I want it, with different functionality.
And now when I see I have to update the cart to make the ot_coupon.php do the right math, I really lose my motivation.

Although I absolutely admire your work on Zen Cart, and I know you mean so much to so many people's businesses - mine too! - I wish it was an easier way to update the core-files, without having the problems regarding modifications.

Keep up the good work, and please give me directions on how I can fix the tax/miscalculation-problems in the ot_coupons.php on 1.3.9h, if there is any easier way. :)

3 Feb 2012, 4:44 PM
#60
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Coupons, some bugs?

We understand your frustration about upgrades being difficult after you make heavy modifications to the code. v2.0 is being architected in a way that minimizes that pain to almost nil.

In the meantime, your best approach is a proper upgrade. The coupon issue discussed in this thread was affected by numerous parts of the code, in numerous places. Hacking all of those out to apply to a store which, as you say, you've already made significant changes to, will not only be near impossible, but will also make future upgrades even more complicated for you. There are a lot of interdependent systems involved in this calculation matter. Backporting it is not practical -- your time is better spent on upgrading your site, and of course will have numerous other valuable benefits in so doing.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.