Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

creating a mod.. >> selects the radio above it


storeweb88

Recommended Posts

im on the checkout_shipping.php page. I am trying to build a new shipping mod that will show all the shipping along with free shipping for only on certain products that are selected. What I found out that I'm doing is part of my mod is repeating iteself therefore not selecting the correct option.

 

I have this part that has the loop.. If I can renumber the loop to start at 1 instead of zero I would be gold...

 

  $radio_buttons = 0;
  for ($i=0, $n=sizeof($quotes); $i<$n; $i++) {
?>

 

 

With that it outputs this in firefox view >> which this repeats itself to " onclick="selectRowEffect(this, 1)"> if I can change that 1 to a zero then I could get it to work..

 

<tr id="defaultSelected" class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, 1)">
 <td style="padding-left: 15px;">
		  Free ground shipping for orders over $50.00

<td>	  

$0.00

	  </td>

  <td align="right"><input type="radio" name="shipping" value="free_freeupsxml_UPS Ground" checked="checked" /> </td>
 </tr>	  <tr id="defaultSelected" class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this,1)">
    <td width="75%" style="padding-left: 15px;">UPS Ground (billed dimensional weight 4 LBS)</td>

    <td>$12.61</td>


    <td align="right"><input type="radio" name="shipping" value="upsxml_UPS Ground" checked="checked" /> </td>

  </tr>
  <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this,2)">
    <td width="75%" style="padding-left: 15px;">UPS 3 Day Select (billed dimensional weight 4 LBS)</td>

    <td>$16.25</td>


    <td align="right"><input type="radio" name="shipping" value="upsxml_UPS 3 Day Select" /> </td>

  </tr>
  <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this,3)">
    <td width="75%" style="padding-left: 15px;">UPS 2nd Day Air (billed dimensional weight 4 LBS)</td>

    <td>$20.65</td>

 

 

 

 

 

 

On the echo of the part I sort of having it working>> which outputs items and lets me select however there is a bunch of junk and other items do not work..

 

echo '	  <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this,'+''.$radio_buttons.')">' . "\n";

 

 

Any pointers or suggestions would greatly be appreicated.

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