Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Recalculate shipping after discount coupon applied

Recalculate shipping after discount coupon applied

Views: 24,862

Results 1 to 20 of 41
20 Jun 2008, 6:00 PM
#1
pjb923 avatar

pjb923

Zen Follower

Join Date:
Jan 2005
Location:
NY
Posts:
135
Plugin Contributions:
0

Recalculate shipping after discount coupon applied

I am working on a site that plans on using lots of discount coupons and is using a table rate shipping based on total cost.

The problem I am having is that the discount is being applied after the shipping is calculated.

Shipping is free for orders over $175, but if a customer has a total of $180 in their cart and then uses a $20 off coupon they are not charged any shipping because the calculation was done based on the order total before the discount was applied.

Is there any way to take coupons into account and re-calculate shipping in a later step of the order process?

Any help would be appreciated.

21 Jun 2008, 1:43 PM
#2
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,717
Plugin Contributions:
56

Re: Recalculate shipping after discount coupon applied

Each of these modules (coupons, shipping, etc.) has a "sort order" that you see in admin->modules->order total. Moving coupons below shipping should work for you.

That Software Guy. My Store: Zen Cart Support
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.

22 Jun 2008, 7:15 PM
#3
pjb923 avatar

pjb923

Zen Follower

Join Date:
Jan 2005
Location:
NY
Posts:
135
Plugin Contributions:
0

Re: Recalculate shipping after discount coupon applied

I tried adjusting the sort order, but it only seems to change the display order. It appears that the shipping is being calculated from the sub-total and the discount is factored in after the fact.

The shipping rate is set to Free for orders over $175, but should charge 10:95 for orders between $75-$175. This is the result I get.

Sub-Total: $177.00
Combination Discounts : -$20.00
Zone Rates (Shipping to US): $0.00
Total: $157.00

I did the same test using a coupon instead of the combination discount and the result is exactly the same.

22 Jun 2008, 7:25 PM
#4
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,717
Plugin Contributions:
56

Re: Recalculate shipping after discount coupon applied

Try putting the discount above the subtotal.

That Software Guy. My Store: Zen Cart Support
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.

23 Jun 2008, 1:05 AM
#5
pjb923 avatar

pjb923

Zen Follower

Join Date:
Jan 2005
Location:
NY
Posts:
135
Plugin Contributions:
0

Re: Recalculate shipping after discount coupon applied

swguy:

Try putting the discount above the subtotal.

I tried that too, but it seems that no matter where I put it, the subtotal is not being affected by the discounts.

23 Jun 2008, 1:29 AM
#6
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,717
Plugin Contributions:
56

Re: Recalculate shipping after discount coupon applied

Pls. see email.

That Software Guy. My Store: Zen Cart Support
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.

25 Jun 2008, 1:32 AM
#7
tbaquatics avatar

tbaquatics

New Zenner

Join Date:
Jan 2008
Posts:
72
Plugin Contributions:
0

Re: Recalculate shipping after discount coupon applied

swguy:

Pls. see email.

I am having the same issue, what was the answer?

27 Jun 2008, 1:51 PM
#8
pjb923 avatar

pjb923

Zen Follower

Join Date:
Jan 2005
Location:
NY
Posts:
135
Plugin Contributions:
0

Re: Recalculate shipping after discount coupon applied

Due to my complicated discount requirements, I purchased the combination discounts module which gave me all of the features I was looking for.

Scott (swguy) was able to write a patch for the zones shipping module that calculated based on the total after discounts were applied.

Thanks for the great support!

10 Jul 2008, 1:15 AM
#9
shrimp_gumbo_mmmhhh avatar

shrimp_gumbo_mmmhhh

Totally Zenned

Join Date:
Jun 2007
Location:
Texas, USA
Posts:
1,436
Plugin Contributions:
0

Re: Recalculate shipping after discount coupon applied

pjb923:

Due to my complicated discount requirements, I purchased the combination discounts module which gave me all of the features I was looking for.

Scott (swguy) was able to write a patch for the zones shipping module that calculated based on the total after discounts were applied.

Thanks for the great support!

SWGuy,

Please pm me with information on getting this patch and the combination discounts module.

Thank you!

Shrimp

29 Jul 2008, 8:16 PM
#10
modernm avatar

modernm

New Zenner

Join Date:
Dec 2007
Location:
Hoboken, NJ
Posts:
97
Plugin Contributions:
1

Re: Recalculate shipping after discount coupon applied

shrimp-gumbo-mmmhhh:

SWGuy,

Please pm me with information on getting this patch and the combination discounts module.

Thank you!

Shrimp

I am also interested in the patch and module. Please PM me as well.

Cal

15 Oct 2008, 9:09 PM
#11
psychicpet avatar

psychicpet

Inactive

Join Date:
Sep 2007
Posts:
44
Plugin Contributions:
0

Re: Recalculate shipping after discount coupon applied

Can someone post the patch? That would be super helpful to a lot of people.

thank you!!!

19 Oct 2008, 1:57 AM
#12
mylildarlings avatar

mylildarlings

New Zenner

Join Date:
Oct 2008
Posts:
21
Plugin Contributions:
0

Re: Recalculate shipping after discount coupon applied

I would like this module too. Thanks!

13 May 2009, 9:42 PM
#13
mikeyg avatar

mikeyg

Totally Zenned

Join Date:
May 2005
Posts:
515
Plugin Contributions:
0

Re: Recalculate shipping after discount coupon applied

I offer free shipping if order total is over £40.

I also use a number of discount coupons. The problem I have is that if some one uses a discount coupon of say 10% on an order that comes to £42 their total then falls back to below £40. But they still get free shipping. What I want is the shipping to be calculated as the very last thing after any discounts and only to be free if there order is still over £40.

I have tried playing with the order or the order totals under modules order totals but this does not seemed to have worked.

Thanks

MG

14 May 2009, 2:31 AM
#14
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,717
Plugin Contributions:
56

Re: Recalculate shipping after discount coupon applied

You have to write code to get it to work this way; nothing is built in.

That Software Guy. My Store: Zen Cart Support
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.

12 Aug 2009, 3:15 AM
#15
gdngrl avatar

gdngrl

New Zenner

Join Date:
Jun 2009
Posts:
9
Plugin Contributions:
0

Re: Recalculate shipping after discount coupon applied

Did anyone ever post the information? I am very interested!

13 Aug 2009, 6:38 AM
#16
ellbiedesign avatar

ellbiedesign

New Zenner

Join Date:
Jul 2009
Posts:
2
Plugin Contributions:
0

Re: Recalculate shipping after discount coupon applied

I think if you all check out swguy's signature you'll see his website in which he offers these modules.

22 Jul 2010, 12:03 AM
#17
larf2k avatar

larf2k

New Zenner

Join Date:
Jun 2010
Posts:
16
Plugin Contributions:
0

Re: Recalculate shipping after discount coupon applied

This is almost EXACTLY what I'm trying to do! I'm trying to process shipping after all discounts, and I can't for the life of me figure it out. I know these previous posts were posted some time ago, but if anyone has any ideas how to achieve this, please help.

19 Nov 2010, 9:09 AM
#18
mikeyg avatar

mikeyg

Totally Zenned

Join Date:
May 2005
Posts:
515
Plugin Contributions:
0

Re: Recalculate shipping after discount coupon applied

Has this been resolved in the latest version (1.3.9h)

I was changing the sort order of the order totals last night but this does not seem to control the order of the calculations.

I too need to take discounts off product before shipping is calculated otherwise a customer gets a reduction in their order below our free shipping value becuase they use a discount and then they still get free shipping. I need it to calculate shipping at the end. Where in the programme is the order of this calculation determined?

17 Dec 2010, 1:10 AM
#19
deb avatar

deb

New Zenner

Join Date:
Jul 2006
Posts:
72
Plugin Contributions:
0

Re: Recalculate shipping after discount coupon applied

Combination discounts was installed @ 2 years ago but I still have not been able to prevent it from allowing free shipping after discounts.

ie. This month we're offering free shipping for orders of $50+ (order total module). We are also offering a 50% sale for which they have to use a coupon code.

The customers are putting $50 worth of product in their cart, which automatically gives them free shipping. Then they are using the 50% discount code so instead of the order being $50, it's only $25 and they've gotten free shipping.

The idea was that they would have to put $100 worth of stuff in their cart, use the discount code reducing it to $50 and then get free shipping. But it's not working that way and never has.

I have tried rearranging the sort order every which way and it's still coming out the same. Current sort order:

discount coupon 90
group discount 99
subtotal 100
shipping 200
tax 300

How can I get the module to calculate shipping after the discount has been applied and not before?

I'm using 1.3.7
Have the Combination Discount Module
My site is: http://www.cropaddict.com

Thanks :)

17 Dec 2010, 1:24 AM
#20
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,717
Plugin Contributions:
56

Re: Recalculate shipping after discount coupon applied

Nothing is built in to do this; you have to add code.

That Software Guy. My Store: Zen Cart Support
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.