Jump to content
Sign in to follow this  
NewBudda

How to change default shipping method radio button?

Recommended Posts

I think the original post was under the wrong heading, so please excuse the double post.

I would like 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? I have tried several things but only got no result, the wrong result or errors...

 

 

Thank you in advance!

Edited by NewBudda

Open Source Newsletter: PhPList

Open Source Questionnaire: Lime Survey

Share this post


Link to post
Share on other sites

I could really use some help on this. Any ideas?


Open Source Newsletter: PhPList

Open Source Questionnaire: Lime Survey

Share this post


Link to post
Share on other sites

I could really use some help on this. Any ideas?

 

 

Did you ever figure this out? I'm struggling with the same thing.

 

Boom

Share this post


Link to post
Share on other sites

I am also searching in vain for the answer to this question. Surely someone has figured it out... (!)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×