Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Default selections in Checkout_Shipping.php


Roaddoctor

Recommended Posts

My store offers 2 shipping choices: FedEx Ground, or Request for Freight Quote.

 

FedEx Ground calculations are always GREATER THAN $0.00

Request for Quote is ALWAYS EQUAL TO $0.00

 

OSCommerce uses the "cheapest" as the default selection, thus causing the RFQ to always be highlighted by default, rather than FeDex, which I would prefer.

 

The relevent code from checkout_shipping.php is:

 

 // if no shipping method has been selected, automatically select the cheapest method.
if ( !tep_session_is_registered('shipping') || ( tep_session_is_registered('shipping') && ($shipping == false) && (tep_count_shipping_modules() > 1) ) ) $shipping = $shipping_modules->cheapest();

 

Could someone help me modify the above line so that the "cheapest" GREATER THAN $0.00 is selected by default? or something like that...

 

Thanks in advance!

Dave

-Dave

Link to comment
Share on other sites

you could try posting a hidden form variable in the page before shipping (or possibly on the same page but above the code below) which sets your $shipping variable to FedEx (you'd need to check what the variable name should be)

 

it may work just to comment out

 

$shipping = $shipping_modules->cheapest();

 

and use

 

$shipping = $shipping_modules->FedEx;

 

in place of it

with ten thousand dollars we'll all be millionaires

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...