storeweb88 Posted August 21, 2013 Share Posted August 21, 2013 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. Quote Link to comment Share on other sites More sharing options...
storeweb88 Posted August 22, 2013 Author Share Posted August 22, 2013 ok heres what I did was.. made a few modifications and then used some sections out of free_shipping _and_include_other_options_v0.6 http://addons.oscommerce.com/info/6439 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.