Page 1 of 1

Shipping Methods - Maximum Purchase

Posted: Mon Oct 13, 2008 10:38 am
by Robbie@FireFold
Currently when setting up Shipping Methods we have the option to setup a minimum.

I would like to set a maximum purchase.

Would help me in controlling USPS selections.

Re: Shipping Methods - Maximum Purchase

Posted: Thu Oct 23, 2008 7:14 am
by kastnerd
For USPS First class international since it can not be insured, we only do it on small products under $50.
Over $50 we would require USPS Express Mail International. But Express mail would be an option under 50 as well.

Re: Shipping Methods - Maximum Purchase

Posted: Tue Oct 28, 2008 1:09 pm
by Robbie@FireFold
I would like to also add in a great feature request.

Being able to select specific items. Just like in promo codes.

Options like:

-Only these items
-Everything but these items

etc.

Vote for me!

Re: Shipping Methods - Maximum Purchase

Posted: Fri Nov 14, 2008 8:15 am
by William_firefold
I did this.
First find this line, ~851 for us.

Code: Select all

string methodName = (totalRate > 0) ? quote.Name + ": " + formattedRate : quote.Name
Then modify the following code and insert it just below that line.

Code: Select all

//Decide what methods the rule applies to
if(methodName.ToString().Contains("USPS First Class")  ||  methodName.ToString().Contains("USPS Priority Mail")){
//Set the maximum price for which these methods will be available
     if(shipment.GetItems().TotalPrice()<50){
          localQuotes.Add(new LocalShipRateQuote(quote.ShipMethodId, methodName, formattedRate));
     }
}else{
     localQuotes.Add(new LocalShipRateQuote(quote.ShipMethodId, methodName, formattedRate));
}

Re: Shipping Methods - Maximum Purchase

Posted: Sat Nov 12, 2011 5:14 pm
by Mizmo67
This code is wonderful, thank you!