Geoff_m Posted January 24, 2005 Posted January 24, 2005 How do you select the default shipping method. I have 2 shipping modules active, the first is a postal method, the second is pick-up from store. The default radio button (green) will only default to the second (pick-up) method which I don't want as the default. I have tried changing sort order of them, then back again, but will only default to pick-up Any ideas thanks
boxtel Posted January 24, 2005 Posted January 24, 2005 How do you select the default shipping method. I have 2 shipping modules active, the first is a postal method, the second is pick-up from store.The default radio button (green) will only default to the second (pick-up) method which I don't want as the default. I have tried changing sort order of them, then back again, but will only default to pick-up Any ideas thanks <{POST_SNAPBACK}> it defaults to the cheapest one. I have not yet figured out a way to circumvent that. Treasurer MFC
Geoff_m Posted January 24, 2005 Author Posted January 24, 2005 Ok, that explains why 2hrs of fiddling around proved fruitless. The reason why this bothers me is that if a customer does not alter the default shipping mode manually, the order will go through freight free. Any suggestions to get around this without disabeling the module as I do require a 'pick-up' alternative? Thanks
ukgoods Posted January 28, 2005 Posted January 28, 2005 Ok, that explains why 2hrs of fiddling around proved fruitless.The reason why this bothers me is that if a customer does not alter the default shipping mode manually, the order will go through freight free. Any suggestions to get around this without disabeling the module as I do require a 'pick-up' alternative? Thanks <{POST_SNAPBACK}> I use three shipping methods: Pick-up, USPS and UPS XML. I always want UPS Ground to be my default shipping method so I made the following change in catalog/includes/classes/shipping.php Look for: if (is_array($cheapest)) { if ($rates[$i]['cost'] < $cheapest['cost']) { $cheapest = $rates[$i]; } } else { $cheapest = $rates[$i]; } } and change it to: for ($i=0, $n=sizeof($rates); $i<$n; $i++) { if ($rates[$i]['id'] == 'upsxml_UPS Ground') { $cheapest = $rates[$i]; } } } Please note that you must use the UPS XML shipping module for this to work. Regards, Donna Gordon UKGoods
Geoff_m Posted January 29, 2005 Author Posted January 29, 2005 I use three shipping methods: Pick-up, USPS and UPS XML. I always want UPS Ground to be my default shipping method so I made the following change in catalog/includes/classes/shipping.php Look for: if (is_array($cheapest)) { ? ? ? ? ? ?if ($rates[$i]['cost'] < $cheapest['cost']) { ? ? ? ? ? ? ?$cheapest = $rates[$i]; ? ? ? ? ? ?} ? ? ? ? ?} else { ? ? ? ? ? ?$cheapest = $rates[$i]; ? ? ? ? ?} ? ? ? ?} and change it to: for ($i=0, $n=sizeof($rates); $i<$n; $i++) { ? ? ? ? ? ? ? if ($rates[$i]['id'] == 'upsxml_UPS Ground') { ? ? ? ? ? ? ? ? $cheapest = $rates[$i]; ? ? ? ? ? ? ? } ? ? ? ?} ? ? } Please note that you must use the UPS XML shipping module for this to work. Regards, Donna Gordon UKGoods <{POST_SNAPBACK}>
Geoff_m Posted January 29, 2005 Author Posted January 29, 2005 I use three shipping methods: Pick-up, USPS and UPS XML. I always want UPS Ground to be my default shipping method so I made the following change in catalog/includes/classes/shipping.php Look for: if (is_array($cheapest)) { ? ? ? ? ? ?if ($rates[$i]['cost'] < $cheapest['cost']) { ? ? ? ? ? ? ?$cheapest = $rates[$i]; ? ? ? ? ? ?} ? ? ? ? ?} else { ? ? ? ? ? ?$cheapest = $rates[$i]; ? ? ? ? ?} ? ? ? ?} and change it to: Thanks Donna, I will give this a go. Thanks for your reply Geoff for ($i=0, $n=sizeof($rates); $i<$n; $i++) { ? ? ? ? ? ? ? if ($rates[$i]['id'] == 'upsxml_UPS Ground') { ? ? ? ? ? ? ? ? $cheapest = $rates[$i]; ? ? ? ? ? ? ? } ? ? ? ?} ? ? } Please note that you must use the UPS XML shipping module for this to work. Regards, Donna Gordon UKGoods <{POST_SNAPBACK}> Thanks Donna, I'll give this a go. rgds Geoff
wheeloftime Posted January 29, 2005 Posted January 29, 2005 Thanks Donna, I'll give this a go.rgds Geoff <{POST_SNAPBACK}> Or change if ($rates[$i]['cost'] < $cheapest['cost']) { to if ($rates[$i]['cost'] > $cheapest['cost']) { which picks the most expensive method which should be appropriate in your case.
daddyroy Posted December 7, 2005 Posted December 7, 2005 Or change if ($rates[$i]['cost'] < $cheapest['cost']) { to if ($rates[$i]['cost'] > $cheapest['cost']) { which picks the most expensive method which should be appropriate in your case. Even if you dont have UPS XML installed it will still work, simple use 'ups_GND' instead of 'upsxml_UPS Ground' for ($i=0, $n=sizeof($rates); $i<$n; $i++) { if ($rates[$i]['id'] == 'ups_GND') { $cheapest = $rates[$i]; } }
Geordiedan Posted May 8, 2006 Posted May 8, 2006 Or change if ($rates[$i]['cost'] < $cheapest['cost']) { to if ($rates[$i]['cost'] > $cheapest['cost']) { which picks the most expensive method which should be appropriate in your case. Brilliant tip! :thumbsup: :thumbsup:
mmph Posted March 30, 2008 Posted March 30, 2008 How do you select the default shipping method. I have 2 shipping modules active, the first is a postal method, the second is pick-up from store.The default radio button (green) will only default to the second (pick-up) method which I don't want as the default. I have tried changing sort order of them, then back again, but will only default to pick-up Any ideas thanks I just installed the shipping methods default contribution for this and it works great. Here's the link: http://www.oscommerce.com/community/contributions,4396
Recommended Posts
Archived
This topic is now archived and is closed to further replies.