Latest News: (loading..)

Archived

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

NewBudda

How to change default shipping method radio button?

5 posts in this topic

I would liek to change the default shipping method. At the moment I offer 2 different ones and the wrong one is selected by default. (radio button) I found this code in the checkout_shipping.php file:

<?php
	} else {
	  for ($j=0, $n2=sizeof($quotes[$i]['methods']); $j<$n2; $j++) {
// set the radio button to be checked if it is the method chosen
		$checked = (($quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'] == $shipping['id']) ? true : false);

		if ( ($checked == true) || ($n == 1 && $n2 == 1) ) {
		  echo '				  <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
		} else {
		  echo '				  <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
		}
?>

What do I need to change to get the other shipping method to be the default one?

If you know the answer could you also let me knwo how it works or how i can find out more about php?

 

Thank you in advance!

Share this post


Link to post
Share on other sites

Any ideas? I only want to have the default shipping method set to the other...

Share this post


Link to post
Share on other sites

I am searching for the answer to this question as well and hope someone will respond. This same question has been posted several times, but no answers yet : (

Share this post


Link to post
Share on other sites

Hi,

You can change the sort order in admin/modules/shipping( if there is a 0 entered anywhere he will always be the default)

John

Share this post


Link to post
Share on other sites

I only have one shipping module (USPS), so changing the sort order in admin/modules/shipping is not applicable because there is only one choice.

 

Within the USPS module, I offer 3 shipping options: Parcel Post, Priority Mail, and Express Mail. The current default is parcel post since it is the cheapest. I would like to change the default to be Priority Mail, regardless of cost, but can't figure out how make the radio button for Priority Mail to be the default. Thanks!

Share this post


Link to post
Share on other sites