Forums / Discounts/Coupons, Gift Certificates, Newsletters, Ads / Coupon Not Deducting Correct Amount

Coupon Not Deducting Correct Amount

Views: 1,868

Results 1 to 12 of 12
29 Jul 2014, 1:22 AM
#1
shannonphx avatar

shannonphx

New Zenner

Join Date:
May 2012
Location:
Phoenix, AZ
Posts:
28
Plugin Contributions:
0

Coupon Not Deducting Correct Amount

While testing some features on my site, I created a coupon code for $108.00 off, (no minimum purchase) & it took $110.90 off the order, instead of $108.00. This makes no sense at all. Previous "real" orders with a % off coupon (for the same item) do calculate correctly. So, why would a specific dollar amount calculate incorrectly?
Here's what the order page says:

Sub-Total: $73.80
Setup Fee: $35.00
Shipping (Standard Delivery ($8.95)): $8.95
Discount Coupon: XXXXX: $108.00
Total: $6.85
The math is wrong. The order total should have been $9.75.
Any ideas about what happened & how to fix it?
29 Jul 2014, 5:46 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Coupon Not Deducting Correct Amount

Could you click Reply and answer all of the questions?

What is the add on for the Setup Fee that you have listed?

Is this just a Discount Coupon that gives $108.00 off without any restrictions?

What is your shipping module that this is using?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

29 Jul 2014, 8:44 PM
#3
shannonphx avatar

shannonphx

New Zenner

Join Date:
May 2012
Location:
Phoenix, AZ
Posts:
28
Plugin Contributions:
0

Re: Coupon Not Deducting Correct Amount

The set up fee is for custom glassware products that require screen printing. This feature is a custom add on to my site & has never given me any problems when combined with a % off coupon.

Yes; this is a Discount Coupon is for $108.00 off with no restrictions. (This was a test transaction, which needed to be processed through PayPal, & I didn't want a large dollar amount to actually be deducted from my account, so I created this coupon strictly for test transactions.)

My shipping module is Ceon Advanced Shipper. I have it configured to offer flat-rate standard shipping for $8.95.

Shannon

29 Jul 2014, 11:31 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Coupon Not Deducting Correct Amount

Could you hit Reply and answer the questions?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

29 Jul 2014, 11:45 PM
#5
shannonphx avatar

shannonphx

New Zenner

Join Date:
May 2012
Location:
Phoenix, AZ
Posts:
28
Plugin Contributions:
0

Re: Coupon Not Deducting Correct Amount

The set up fee is for custom glassware products that require screen printing. This feature is a custom add on to my site & has never given me any problems when combined with a % off coupon.

Yes; this is a Discount Coupon is for $108.00 off with no restrictions. (This was a test transaction, which needed to be processed through PayPal, & I didn't want a large dollar amount to actually be deducted from my account, so I created this coupon strictly for test transactions.)

My shipping module is Ceon Advanced Shipper. I have it configured to offer flat-rate standard shipping for $8.95.

Shannon

30 Jul 2014, 12:01 AM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Coupon Not Deducting Correct Amount

When you hit Reply, there are numerous questions under Posting Tips listed, could you please hit Reply and answer each of those questions?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

30 Jul 2014, 2:19 AM
#7
shannonphx avatar

shannonphx

New Zenner

Join Date:
May 2012
Location:
Phoenix, AZ
Posts:
28
Plugin Contributions:
0

Re: Coupon Not Deducting Correct Amount

Oh... THOSE questions. Sorry!

I'm using Zen Cart 1.5.0. I have never upgraded Zen Cart. The person who initially designed my website installed it for me.
MySQL Version: 5.5.37
PHP Version: 5.3.3 (Zend: 2.3.0)
My URL is: https://www.GottaHaveThat.com

Modules Installed:
PayPal Express Checkout
Fast & Easy Checkout
Products Quantity Discount
Magic Thumb
Image Handler
Easy Populate 4
CSS/JS Loader
Ceon Advanced Shipper
Ceon URI Mapping Manager
Google Analytics

My site is highly customized:

  1. I have the ability to create dependent attributes.
  2. Customer can purchase multiples of an item & choose different attributes for each one.
  3. The site has 13 custom product design interfaces for various types of products, which the customer can design themselves. Interfaces are hosted by the product manufacturer & my site integrates these interfaces with my shopping cart.

Debug Log -- The last myDEBUG-adm file in my cache folder is dated May 22, 2014.

30 Jul 2014, 4:11 PM
#8
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Coupon Not Deducting Correct Amount

shannonphx:

Here's what the order page says:

             Sub-Total: | 
             $73.80 | 
             Setup Fee: | 
             $35.00 | 
             Shipping (Standard Delivery ($8.95)): | 
             $8.95 | 
             Discount Coupon: XXXXX: | 
             $108.00 | 
             Total: | 
             $6.85 | 
  The math is wrong. The order total should have been $9.75.
  Any ideas about what happened & how to fix it?

Do any of these figures include TAX? That's about the only thing that springs to my mind, even if it is a bit illogical that it only seems to be a problem when not using percentages.

It may be worthwhile creating a few dummy products with nice 'round' figures $10.00, $100.00 or whatever, with equally 'round' discounts and free postage in order to figure out if these is some kind of 'pattern' involved in the discrepancies (free postage so as to take this out of the equation completely).

There is sure to be some kind of pattern to the results given, and that pattern will usually provide a clue as to where things are going astray.

With the single example that you have provided it is little more than a guessing game.

Cheers
RodG

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

30 Jul 2014, 4:38 PM
#9
shannonphx avatar

shannonphx

New Zenner

Join Date:
May 2012
Location:
Phoenix, AZ
Posts:
28
Plugin Contributions:
0

Re: Coupon Not Deducting Correct Amount

My site is configured to only charge tax when shipping to my state (Arizona). Since I used my credit card for this transaction, the order originally did include sales tax. So, I changed the shipping address to another state, which took the tax off the order. So, the totals do not include any tax.

I'll do some additional test transactions & see what happens. I'll post the results later today.

Shannon
https://www.GottaHaveThat.com

30 Jul 2014, 5:13 PM
#10
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Coupon Not Deducting Correct Amount

shannonphx:

My site is configured to only charge tax when shipping to my state (Arizona). Since I used my credit card for this transaction, the order originally did include sales tax. So, I changed the shipping address to another state, which took the tax off the order. So, the totals do not include any tax.

Something to keep in mind here is that ZenCart doesn't base its tax on the order total.
Shipping tax, product tax, and even discount coupon taxes are all calculated independently, and considering the amounts involved in your current example it wouldn't surprise me if the discrepancy turns out to be caused by a shipping tax.

I admit that this is still nothing more than a wild guess though because there isn't enough data to come to any definitive conclusions, so while on the topic of performing additional tests, it may also be worthwhile configuring the store to show any tax amounts being applied.

Cheers
RodG

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

31 Jul 2014, 3:57 AM
#11
shannonphx avatar

shannonphx

New Zenner

Join Date:
May 2012
Location:
Phoenix, AZ
Posts:
28
Plugin Contributions:
0

Re: Coupon Not Deducting Correct Amount

I did several tests & I think I narrowed the problem down to the Setup Fee.

Below are examples of the tests I did. My notes about each transaction are in PINK.

For some reason, ZenCart is not calculating totals correctly if there is a Setup Fee for the product. If a $ off coupon is used on a product with a Setup Fee, then the tax and total are wrong. But, if there is no coupon used, the taxable amount is correct.

My site is set up to not charge tax on shipping. Only products and Setup Fees are taxable.

So... Why is this happening & how do I fix it?

Here are some of the tests I did:
Attachment 14345

31 Jul 2014, 9:00 AM
#12
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Coupon Not Deducting Correct Amount

shannonphx:

I did several tests & I think I narrowed the problem down to the Setup Fee.

OK, so lets look at some of these figures.
Using the last of your examples, we have this

cost tax
82.40 6.84
35.00 2.90
8.95 0.00

126.35 9.74 - No tax on shipping (??????)

The 'correct' amounts here should (probably be)
cost tax
82.40 6.84
35.00 2.90
8.95 0.74

126.35 10.48

Now the 'fun' bit. The total in this example shows
133.19 which is exactly 6.84 higher than it should be. Is it a coincidence that this is the same amount as the tax on the product itself? I very much doubt it.

Using your 3rd example we have
cost tax
73.80 6.13
35 2.90
8.95 0.74

117.75 9.77
-108

9.75

The total displayed is 6.85. A difference of $2.90. Is it a coincidence that 2.90 is the tax amount for the setup fee? I very much doubt it.

So, it looks to me that what is happening is that some costs are being double taxed, but having said that, your 4th example seems to defy explanation.

So, what could/would cause this? I can only think it is a coding error somewhere, and since a 'native' zencart doesn't exhibit this strange kind of behaviour, I'm inclined to think that it has something to do with your custom addon for the setup fees. (OK, so it is easy to blame the unknown), but I really can't think of what else it would/could be.

Exactly how/where is this fee being added? A new/modified order total module? an automatically added 'product'? Other?

Is it possible for you to provide the relevant code for inspection?

Would I be wrong to assume that without the Setup fee then all else is OK? (with and without discounts?)

Other than what I've just written, I'm pretty much stumped for any other explanation.

Cheers
RodG

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.