Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to change default shipping method radio button?


NewBudda

Recommended Posts

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!

Open Source Newsletter: PhPList

Open Source Questionnaire: Lime Survey

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 years later...

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

To improve is to change; to be perfect is to change often.

 

Link to comment
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!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...