Fredrik.r Posted May 31, 2006 Share Posted May 31, 2006 (edited) It seems like the cheapest shipping method is checked by default in checkout_shipping.php. So far so good, that's fair. But, when offering free shipping ($0) and express shipping ($10) it keeps check the express method.. It doesnt seem it can compare these if one of them are zero. I want it to check the free shipping, otherwise customers might just click forward to checkout payment. I believe the function is below somewhere but I do not understand it; 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"; } ?> <td class="main" width="75%"><?php echo $quotes[$i]['methods'][$j]['title']; ?></td> <?php if ( ($n > 1) || ($n2 > 1) ) { ?> Edited May 31, 2006 by Fredrik.r Quote Link to comment Share on other sites More sharing options...
Fredrik.r Posted June 1, 2006 Author Share Posted June 1, 2006 (edited) Any ideas about this? Some customers just click forward and pays for express shipping when they actually can choose free shipping. Edited June 1, 2006 by Fredrik.r Quote Link to comment Share on other sites More sharing options...
Fredrik.r Posted June 22, 2006 Author Share Posted June 22, 2006 I'm sure someone knows how to fix this.. please.. :) Quote Link to comment Share on other sites More sharing options...
golfman2006 Posted July 13, 2006 Share Posted July 13, 2006 (edited) I'm sure someone knows how to fix this.. please.. :) I wish I could help, but I too am experiencing this problem and don't know how to fix. Anyone out there have an answer? Edited July 13, 2006 by golfman2006 Quote Link to comment Share on other sites More sharing options...
Fredrik.r Posted July 13, 2006 Author Share Posted July 13, 2006 The code above may not be the right one, it may be in includes/classes/shipping.php Let's hope someone knows how to fix this :) Quote Link to comment Share on other sites More sharing options...
Guest Posted July 15, 2006 Share Posted July 15, 2006 The code above may not be the right one, it may be in includes/classes/shipping.php Let's hope someone knows how to fix this :) That code has nothing to do with your problem. The sorting is done in PHP, not HTML, in shipping.php, i think. If you are still interested in this problem drop me a line. Quote Link to comment Share on other sites More sharing options...
abra123cadabra Posted July 31, 2006 Share Posted July 31, 2006 Got the same problem. I had the multitable contribution installed before and now I got the multizones multi tables contrib up and running. I modified it a bit to reflect my way of calculating the shipping cost and that's working fine. Only thing is that with the contrib used before and with this one the second option is selected by default. The first option is always zero but somehow the cheapest() in classes/shipping.php ignores this. Any idea what I need to change? abra Quote The First Law of E-Commerce: If the user can't find the product, the user can't buy the product. Feedback and suggestions on my shop welcome. Note: My advice is based on my own experience or on something I read in these forums. No guarantee it'll work for you! Make sure that you always BACKUP the database and the files you are going to change so that you can rollback to a working version if things go wrong. Link to comment Share on other sites More sharing options...
Guest Posted July 31, 2006 Share Posted July 31, 2006 You are using the free shipping option as I understand. Disable free shipping. Then install another shipping module that performs the role of free shipping, ie if the order is over a specific amount you activate the module to return 0, otherwise you disable it (or whatever the conditions are for free shipping for your store). Then the cheapest will default to the cheapest method. Quote Link to comment Share on other sites More sharing options...
abra123cadabra Posted August 1, 2006 Share Posted August 1, 2006 Sorry, if I wasn't clear enough. I'm using the MultiGeoZone MultiTable Shipping contribution. I have 3 zones with 4 tables each (economy pickup, express pickup, economy courier and express courier). Economy pickup is always free so the table entry is 0:0. Economy courier is a flat rate per 30 kg packet so the table entry is 0:7, 30:14, 60:21 etc. The express pickup and courier charges depend on the weight, the table is something like this: 0:19, 8: 24, 18: 28 etc. During checkout all four table rates for the zone are displayed correctly but the economy pickup is never preselected as the cheapest. It's always the second table rate. I checked the shipping.php but couldn't figure out why it wouldn't set the first table rate to be the cheapest. abra Quote The First Law of E-Commerce: If the user can't find the product, the user can't buy the product. Feedback and suggestions on my shop welcome. Note: My advice is based on my own experience or on something I read in these forums. No guarantee it'll work for you! Make sure that you always BACKUP the database and the files you are going to change so that you can rollback to a working version if things go wrong. Link to comment Share on other sites More sharing options...
Guest Posted August 1, 2006 Share Posted August 1, 2006 Ok, the other thing you could make sure you have is what Tim mentioned here http://www.oscommerce.com/forums/index.php?showtopic=220777 basically remove the tep_not_null check from the cheapest function Quote Link to comment Share on other sites More sharing options...
abra123cadabra Posted August 1, 2006 Share Posted August 1, 2006 Thanks, enigma1! I guessed it's this bit and I thought I had modified it correctly... It was obviously too late last night to do it properly. abra Quote The First Law of E-Commerce: If the user can't find the product, the user can't buy the product. Feedback and suggestions on my shop welcome. Note: My advice is based on my own experience or on something I read in these forums. No guarantee it'll work for you! Make sure that you always BACKUP the database and the files you are going to change so that you can rollback to a working version if things go wrong. 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.