OSCOMMERCE SUPPORT CALL 702-453-3332

 

Help - Search - Members - Calendar
Full Version: Set/Change default shipping method
osCommerce Community Support Forums > osCommerce Online Merchant v2.x > Tips and Tricks
GemRock
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:
CODE
$cheapest = $rates[$i];
and change both to:
CODE
$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
CODE
$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
markg@dpie.com
QUOTE (GemRock @ Dec 16 2007, 10:56 PM) *
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:
CODE
$cheapest = $rates[$i];
and change both to:
CODE
$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
CODE
$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!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.