We have a 'free shipping' method set up with a minimum purchase amount of $50.00. When a customer purchases an item with a regular price above this amount then applies a coupon code that takes the total order below it, the free shipping method is applied.
We want the minimum purchase amount calculated based on the total in the basket before any coupons are applied. Is there a way to do this?
Minimum amount on ShipMethod charged AFTER discounts
- mfreeze
- Commodore (COMO)
- Posts: 421
- Joined: Mon Jan 24, 2005 2:07 pm
- Location: Washington, NJ
- Contact:
Minimum amount on ShipMethod charged AFTER discounts
Mary E Freeze
Freeze Frame Graphics
Web Hosting and Design, ASP and CFMX Development
http://www.ffgraphics.com
Freeze Frame Graphics
Web Hosting and Design, ASP and CFMX Development
http://www.ffgraphics.com
- mfreeze
- Commodore (COMO)
- Posts: 421
- Joined: Mon Jan 24, 2005 2:07 pm
- Location: Washington, NJ
- Contact:
Re: Minimum amount on ShipMethod charged AFTER discounts
Sorry. I misunderstood the problem my customer was reporting. I had it just the opposite.
The 'free shipping' is set up for a minimum purchase of $50. If a customer buys a product for more than $50 then applies a coupon code that takes the amount below $50, free shipping is still an option and it should not be.
So it appears that the minimum is being calculated on the total order BEFORE the coupon code is applied.
The coupon code does not appear to be changing the calculation of the minimum purchase amount.
The 'free shipping' is set up for a minimum purchase of $50. If a customer buys a product for more than $50 then applies a coupon code that takes the amount below $50, free shipping is still an option and it should not be.
So it appears that the minimum is being calculated on the total order BEFORE the coupon code is applied.
The coupon code does not appear to be changing the calculation of the minimum purchase amount.
Mary E Freeze
Freeze Frame Graphics
Web Hosting and Design, ASP and CFMX Development
http://www.ffgraphics.com
Freeze Frame Graphics
Web Hosting and Design, ASP and CFMX Development
http://www.ffgraphics.com
Re: Minimum amount on ShipMethod charged AFTER discounts
You can try following code to made a check deeding upon total product price of a basket. Locate following code in your ConLib/OnePageCheckout.ascx.cs file
and then change it as below
Code: Select all
ShipMethodList.DataSource = localQuotes;
ShipMethodList.DataBind();
Code: Select all
List<LocalShipRateQuote> notAllowed = new List<LocalShipRateQuote>();
foreach (LocalShipRateQuote lsrq in localQuotes)
{
ShipMethod shipMethod = ShipMethodDataSource.Load(lsrq.ShipMethodId);
if (shipMethod.MinPurchase > 0 && Token.Instance.User.Basket.Items.TotalProductPrice < shipMethod.MinPurchase)
notAllowed.Add(lsrq);
}
foreach (LocalShipRateQuote lsrq in notAllowed)
localQuotes.Remove(lsrq);
ShipMethodList.DataSource = localQuotes;
ShipMethodList.DataBind();