Jump to content
Sign in to follow this  
zwayne

Checkout_shipping message

Recommended Posts

I've done some searching for this problem but came up with only one unanswered question that was similar to this (the search facility here leaves a lot to be desired - I often have to resort to Google with site:forums.oscommerce.com!)

 

Anyway, if I ship only via UPS, but have multiple methods (ground, 2nd day air, etc), the message

 

This is currently the only shipping method available to use on this order

 

shows up. I.e., TEXT_ENTER_SHIPPING_INFORMATION instead of TEXT_CHOOSE_SHIPPING_METHOD. This is determined in checkout_shipping.php here:

 

 

    if (sizeof($quotes) > 1 && sizeof($quotes[0]) > 1) {
?>
             <tr>
               <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
               <td class="main" width="50%" valign="top"><?php echo TEXT_CHOOSE_SHIPPING_METHOD; ?></td>
               <td class="main" width="50%" valign="top" align="right"><?php echo '<b>' . TITLE_PLEASE_SELECT . '</b><br>' . tep_image(DIR_WS_IMAGES . 'arrow_east_south.gif'); ?></td>
               <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
             </tr>
<?php
   } elseif ($free_shipping == false) {
?>
             <tr>
               <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
               <td class="main" width="100%" colspan="2"><?php echo TEXT_ENTER_SHIPPING_INFORMATION; ?></td>
<td><?php var_dump(sizeof($quotes[0]["methods"])); ?></td>
               <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
             </tr>

 

The problem is that sizeof($quotes)=1 with a single carrier and so it skips the first section with TEXT_CHOOSE_SHIPPING_METHOD.

 

It seems to me that if sizeof($quotes)=1 then the code should be checking sizeof($quotes[0]["methods"]) and if >1, then there are multiple shipping methods.

 

Has this been pointed out before?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×