If this is your first visit, check our documentation. To post, register or login.
Forums / Discounts/Coupons, Gift Certificates, Newsletters, Ads / Discount Coupon - Minimum Order Value Excluding Tax

Discount Coupon - Minimum Order Value Excluding Tax

Started by allmart on 27 Apr 2018, 3:08 PM · Views: 16,994

Results 1 to 13 of 13
27 Apr 2018, 3:08 PM
#1
allmart avatar

allmart

Zen Follower

Join Date:
Feb 2016
Location:
Canada
Posts:
192
Plugin Contributions:
0

Discount Coupon - Minimum Order Value Excluding Tax

Hello All,

I am wondering if anyone has a suggestion for an issue I am having. Living where I do, we are blessed with sales tax (lucky us). When creating discount coupons I want to be able to have the minimum order value to qualify for the discount to exclude sales tax. Say $100.00 before tax.

Thanks in advance for your help!

27 Apr 2018, 8:19 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Discount Coupon - Minimum Order Value Excluding Tax

allmart:

Hello All,

I am wondering if anyone has a suggestion for an issue I am having. Living where I do, we are blessed with sales tax (lucky us). When creating discount coupons I want to be able to have the minimum order value to qualify for the discount to exclude sales tax. Say $100.00 before tax.

Thanks in advance for your help!

Well, a couple of questions back, what has been observed in trying to use a coupon code with a minimum order of $100?
Is the catalog side set to display prices with tax?

It looks like the ot_coupon code has a few issues... There is a setting in the admin under modules->Order Totals specific to ot_coupon where tax can be included or not; however, that doesn't seem to quite work as intended throughout. I found then also that if a product were restricted (not to be used for the coupon) and the customer's zone was not in the same tax zone as the tax that was being added, it is possible that the tax would not be properly considered when addressing the tax of the restricted product...

I did find with a relatively minor change to the code that allowed product could be determined by a minimum price that is based on the price of the product excluding tax, but other settings and as I said product restrictions could cause issue with minimum order totals when using the coupon. :/

I plan to look at it more, but there's a lot involved in testing by having at least three screens open (code, catalog and admin for reference/response review).

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

27 Apr 2018, 8:25 PM
#3
allmart avatar

allmart

Zen Follower

Join Date:
Feb 2016
Location:
Canada
Posts:
192
Plugin Contributions:
0

Re: Discount Coupon - Minimum Order Value Excluding Tax

The catalog is set to prices excluding tax and if it helps I am only using 1 zone.
Thanks for your help!!!

27 Apr 2018, 8:26 PM
#4
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,142
Plugin Contributions:
56

Re: Discount Coupon - Minimum Order Value Excluding Tax

What are your order-total sort orders? Is the ot_coupon's sort-order lower than that for ot_tax?

27 Apr 2018, 8:32 PM
#5
allmart avatar

allmart

Zen Follower

Join Date:
Feb 2016
Location:
Canada
Posts:
192
Plugin Contributions:
0

Re: Discount Coupon - Minimum Order Value Excluding Tax

Order-total sort order is 999 and ot_tax is 300.

27 Apr 2018, 8:44 PM
#6
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Discount Coupon - Minimum Order Value Excluding Tax

allmart:

Order-total sort order is 999 and ot_tax is 300.
What about ot_coupon?

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

30 Apr 2018, 3:08 PM
#7
allmart avatar

allmart

Zen Follower

Join Date:
Feb 2016
Location:
Canada
Posts:
192
Plugin Contributions:
0

Re: Discount Coupon - Minimum Order Value Excluding Tax

Sorry for the late reply the ot_coupon is 280

30 Apr 2018, 4:08 PM
#8
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,142
Plugin Contributions:
56

Re: Discount Coupon - Minimum Order Value Excluding Tax

What is your store's setting for Configuration->My Store->Display Prices with Tax?

30 Apr 2018, 4:10 PM
#9
allmart avatar

allmart

Zen Follower

Join Date:
Feb 2016
Location:
Canada
Posts:
192
Plugin Contributions:
0

Re: Discount Coupon - Minimum Order Value Excluding Tax

Display Prices with Tax: false

30 Apr 2018, 4:27 PM
#10
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,142
Plugin Contributions:
56

Re: Discount Coupon - Minimum Order Value Excluding Tax

All those settings look good. I just created a product with a 99.99 price and a coupon set for a minimum order of 100.00. When I applied that coupon to an order containing only that product, I received the message "You must spend at least $100.00 to redeem this coupon".

Am I misinterpreting your original question? Were you indicating that the coupon wasn't working or asking how to set that coupon up?

30 Apr 2018, 4:33 PM
#11
allmart avatar

allmart

Zen Follower

Join Date:
Feb 2016
Location:
Canada
Posts:
192
Plugin Contributions:
0

Re: Discount Coupon - Minimum Order Value Excluding Tax

The issue I have is with sales tax. Some of our products are tax exempt but for the rest the tax rate is 13%. If a customer orders $90.00 of taxable product, because the total including taxes is more than $100.00 the coupon is valid which is not what I want. I want the coupon only to be valid if the sub-total before taxes is at least $100.

2 May 2018, 3:17 PM
#12
allmart avatar

allmart

Zen Follower

Join Date:
Feb 2016
Location:
Canada
Posts:
192
Plugin Contributions:
0

Re: Discount Coupon - Minimum Order Value Excluding Tax

No worries I figured it out, it may be crude but it works. I changed in includes/modules/order_total/ot_coupon.php in red
if ($coupon_result->fields['coupon_minimum_order'] > 0 && strval($order_total['orderTotal']) < $coupon_result->fields['coupon_minimum_order']) {
to:
if ($coupon_result->fields['coupon_minimum_order'] > 0 && ($order->info['total'] -($order->info['tax'] = $order->info['tax'] - $tax) - $order->info['shipping_cost']) < $coupon_result->fields['coupon_minimum_order']) {

so now if your minimum order is set to $100 for example, it is $100 not including shipping and taxes.

Thanks,

20 Jul 2020, 5:38 PM
#13
allmart avatar

allmart

Zen Follower

Join Date:
Feb 2016
Location:
Canada
Posts:
192
Plugin Contributions:
0

Re: Discount Coupon - Minimum Order Value Excluding Tax

Hello,

I have a strange problem that just started happening 2 weeks ago. I have been using my discount code "FIRSTFREE" that is a one time use coupon for any customer that places an order of $100.00 or more which will give them a shipping discount of $10.00 which is the usual shipping amount. Shipping is taxable at 13% and the shipping tax is shown separately at checkout. If the customer is charged $10.00 shipping then there is a tax charge of $1.30. Until recently when the "FirstFree" coupon code (which is set as free shipping) was used there was no shipping tax shown at check out which was correct, now however although it shows the discount amount of $10.00 it also show the shipping tax of $1.30 which wasn't the case until recently and is incorrect.

Thanks in advance for your help!!!