Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

change shipping automatic selection


olgapach

Recommended Posts

Posted

I'll very much appreciate if someone could tell how should I change in the file checkout_shipping the line where automatically selects the cheapest shipping method. I'd like to automatically select the most expensive.

 

I know that the line to be changed is the following but I don't know how to do it:

if ( !tep_session_is_registered('shipping') || ( tep_session_is_registered('shipping') && ($shipping == false) && (tep_count_shipping_modules() > 1) ) ) $shipping = $shipping_modules->cheapest();

 

Thanks in advance

Posted

Hello olgapach!

Can you please tell me where did you made changes ? i would like to set non-automatic choice, as my customer should chose himself Expres shiping (expensive) or by zone!

  • 4 months later...
Posted

This is how I did it:

 

In catalog/includes/classes/shipping.php at line 111 I changed:

 

if ($rates[$i]['cost'] < $cheapest['cost']) {

To:

if ($rates[$i]['cost'] > $cheapest['cost']) {

 

Just the less than "<" to greater than ">" was changed to automatically select the most expensive button.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...