Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Free Shipping with Zero Weight - how to change default shipping method?


jweltydotcom

Recommended Posts

I have installed Free Shipping with Zero Weight feature but after the customer has checked out it listed the shipping method as UPS Next Day Air!! Is there a way to change this??

 

By default the checked value is the cheapest one.

If you want to choose a different value you have to do this modify. I don't know if this the best way but it is "my" way and it works! ;)

 

1) open in /includes/modules/shipping/ the shipping you want to set by default

 

2) Find code:

$this->quotes = array('id' => $this->code,

'module' => MODULE_SHIPPING_ yours ! _TEXT_TITLE,

 

 

3) Add this line:

'checked' => 'true',

 

 

4) So you will get:

$this->quotes = array('id' => $this->code,

'module' => MODULE_SHIPPING_ yours! _TEXT_TITLE,

'checked' => 'true',

'methods' => array());

 

 

5) Save and update

 

 

6) Open file checkout_shipping.php and find this code:

 

$checked = (($quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'] == $shipping['id']) ? true : false);

 

if ( ($checked == true) || ($n == 1 && $n2 == 1) ) {

 

 

7) Subst with this code:

 

//$checked = (($quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'] == $shipping['id']) ? true : false);

 

//if ( ($checked == true) || ($n == 1 && $n2 == 1) ) {

if ( ($quotes[$i]['checked'] == 'true') || ($n == 1 && $n2 == 1) ) {

 

 

8) Find code:

 

<td class="main" align="right"><?php echo tep_draw_radio_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'], $checked); ?></td>

 

 

9) Subst with this code:

<td width="118" align="right" valign="middle" class="main"><?php echo tep_draw_radio_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'], $quotes[$i]['checked']); ?></td>

 

 

10) Save and update.

 

 

I hope this can be helpful.

Cya.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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...