Here is a way to prevent ZC from pre-selecting the cheapest shipping option on checkout Step 1 Shipping Method page. I have also included a way to prevent the Shipping Estimater from displaying the cheapest method in bold font.
--
Feature modified:Checkout Shipping Methods
Objective:Disable pre-selection of cheapest shipping method during checkout.
Comments:
- This affects Step 1 "Shipping Method" page of the checkout process. Upon entering this page all radio buttons will be in an unselected state until the customer makes a selection.
- All applicable shipping options will be displayed and none will be pre-selected.
- Customers cannot continue to the next step until a shipping option has been selected.
- Radio buttons for selected shipping method are cleared each time customer visits this page. If the customer moves from Step 1 Shipping Method to Step 2 Payment Information and then chooses to back into Step 1 again, the customer will have to reselect his/her shipping option.
Procedure:
- Locate file: /includes/templates/[custom]/templates/tpl_checkout_shipping_default.php. If the file does not exist, copy /includes/templates/template_default/tpl_checkout_shipping_default.php and place in /includes/templates/[custom]/templates/ folder.
- Modify /includes/templates/[custom]/templates/tpl_checkout_shipping_default.php.as follows: find around line 79 the following code:
Code:
// set the radio button to be checked if it is the method chosen
$checked = (($quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'] == $_SESSION['shipping']['id']) ? true :
false);
if ( ($checked == true) || ($n == 1 && $n2 == 1) ) {
change to:
Code:
// set the radio button to be checked if it is the method chosen
// BEGIN disable automatic selection of cheapest shipping rate
// $checked = (($quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'] == $_SESSION['shipping']['id']) ? true
: false);
// END
if ( ($checked == true) || ($n == 1 && $n2 == 1) ) {
----------
Feature modified:Shipping Estimater
Objective:Disable bold facing the cheapest shipping option.
Comments:All applicable shipping options will be displayed and none will be displayed with bold font.
Procedure:
- Locate file: /includes/templates/[custom]/templates/tpl_modules_shipping_estimater.php. If the file does not exist, copy /includes/templates/template_default/tpl_modules_shipping_estimator.php and place in /includes/templates/[custom]/templates folder.
- Modify /includes/templates/[custom]/templates/tpl_modules_shipping_estimater.php as follows: find around line 134 the following code:
Code:
if($selected_shipping['id'] == $thisquoteid){
?>
<td class="bold"><?php echo $quotes[$i]['module']; ?> (<?php echo $quotes[$i]['methods'][$j]['title']; ?>)</td>
<td class="cartTotalDisplay bold"><?php echo $currencies->format(zen_add_tax($quotes[$i]['methods'][$j]['cost'],
$quotes[$i]['tax'])); ?></td>
</tr>
and change to:
Code:
if($selected_shipping['id'] == $thisquoteid){
?>
<!-- modified to disable bolding of cheapest shipping option
<td class="bold"><?php echo $quotes[$i]['module']; ?> (<?php echo $quotes[$i]['methods'][$j]['title']; ?>)</td>
<td class="cartTotalDisplay bold"><?php echo $currencies->format(zen_add_tax($quotes[$i]['methods'][$j]['cost'],
$quotes[$i]['tax'])); ?></td> -->
<td><?php echo $quotes[$i]['module']; ?> (<?php echo $quotes[$i]['methods'][$j]['title']; ?>)</td>
<td class="cartTotalDisplay"><?php echo $currencies->format(zen_add_tax($quotes[$i]['methods'][$j]['cost'],
$quotes[$i]['tax'])); ?></td>
</tr>
Additional comments:This works with a shop that has UPS, USPS, and Free Shipping! (free shipper) enabled. I'm not sure if it works with other modules turned on. There is a lot of similar code earlier in the file and I'm not sure where that comes into play. A lot of it appears associated with one of the Free Shipping modules, so test thoroughly before going live.
Bookmarks