Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

I am using FedEx_1_4-webservices_v9_4_2 on a v2.2 RC2 store. I only ship with FedEx, but I want the 2-day radio button to be automatically selected by default, not cheapest (i.e. Ground Shipping).

 

What code have others used or what can be done to select the radio button by default (other than cheapest) in this FedEx shipping module?

Posted

I was able to get the most expensive rate automatically selected by doing the following:

 

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 method radio button.

 

Ideally, I want to change it to automatically select 2-Day for USA and most expensive for rest of world. This idea may work in catalog/includes/classes/shipping.php, but I still do not know how to write the "if, then" statements. Can anyone help me out?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...