GemRock Posted December 16, 2007 Posted December 16, 2007 I know there's a contribution for this, but for those who simply want to set to default a shipping method of his/her choice, which is not the cheapest, then here is a simpler, quicker way of doing it: 1. open [catalog]includes/classes/shipping.php for edit. Look for at around line 112 & 115 these two lines of code: $cheapest = $rates[$i]; and change both to: $cheapest = $rates[0]; 2. in admin, modules - shipping, give/change the sort order of the shipping method you want to set as default to 1, ie, the top most, or you will need to the '0' in $rates[0] as shown above to a number that corresponds to your chosen shipping method's sort order, eg, 1 for sort order 2. No other change is needed. Ken commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience.
markg-uk Posted June 5, 2008 Posted June 5, 2008 I know there's a contribution for this, but for those who simply want to set to default a shipping method of his/her choice, which is not the cheapest, then here is a simpler, quicker way of doing it: 1. open [catalog]includes/classes/shipping.php for edit. Look for at around line 112 & 115 these two lines of code: $cheapest = $rates[$i]; and change both to: $cheapest = $rates[0]; 2. in admin, modules - shipping, give/change the sort order of the shipping method you want to set as default to 1, ie, the top most, or you will need to the '0' in $rates[0] as shown above to a number that corresponds to your chosen shipping method's sort order, eg, 1 for sort order 2. No other change is needed. Ken Was just about to install that contribution as I've just setup a store pickup rate (which then became the default choice as its free - not too great) - you have saved me a lot of time. Thanks!
flowremedies Posted August 14, 2008 Posted August 14, 2008 Thanks!!! I was digging through the contributions for something to sort my shipping methods, as I had the same problem with the cheapest method. I couldn't really find anything that suited my problem, so I decided to google for tips and stumbled on your post :thumbsup: :thumbsup:
Guest Posted September 12, 2008 Posted September 12, 2008 Thank you very much, just what I was looking for.
ramzog Posted May 5, 2009 Posted May 5, 2009 Thank you! I know there's a contribution for this, but for those who simply want to set to default a shipping method of his/her choice, which is not the cheapest, then here is a simpler, quicker way of doing it: 1. open [catalog]includes/classes/shipping.php for edit. Look for at around line 112 & 115 these two lines of code: $cheapest = $rates[$i]; and change both to: $cheapest = $rates[0]; 2. in admin, modules - shipping, give/change the sort order of the shipping method you want to set as default to 1, ie, the top most, or you will need to the '0' in $rates[0] as shown above to a number that corresponds to your chosen shipping method's sort order, eg, 1 for sort order 2. No other change is needed. Ken
cinolas Posted June 29, 2011 Posted June 29, 2011 Another alternative is to make it so that the cheapest non-free shipping rate is the default by simply changing the IF at line 111 FROM: if ($rates[$i]['cost'] < $cheapest['cost']) { TO: if (($rates[$i]['cost'] < $cheapest['cost']) && ($rates[$i]['cost'] > 0)) { That's what works best for me, hopefully it'l help others too.
ZiSMO Posted May 24, 2012 Posted May 24, 2012 Does anybody know how to change my flat rate shipping from 4.99 to 2.50?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.