wpsc_update_shipping_multiple_methods

Located in: cart.class.php
Version Introduced: 3.8

Description: This function is not used to display anything, and would probably not be considered to be a tag, however this function is very important and must be used on the checkout page. It will update the shipping option to the users data, if they have more than one shipping quote to choose from on the product page (it will update the data with the one selected shipping method)

Code Example:
[php highlight=”4″]
<?php if (wpsc_have_morethanone_shipping_quote()) :?>
<?php while (wpsc_have_shipping_methods()) : wpsc_the_shipping_method(); ?>
<?php if (!wpsc_have_shipping_quotes()) { continue; } // Don’t display shipping method if it doesn’t have at least one quote ?>
<tr class=’wpsc_shipping_header’><td class=’shipping_header’ colspan=’5′><?php echo wpsc_shipping_method_name().__(‘ – Choose a Shipping Rate’, ‘wpsc’); ?> </td></tr>
<?php while (wpsc_have_shipping_quotes()) : wpsc_the_shipping_quote(); ?>
<tr class='<?php echo wpsc_shipping_quote_html_id(); ?>’>
<td class=’wpsc_shipping_quote_name wpsc_shipping_quote_name_<?php echo wpsc_shipping_quote_html_id(); ?>’ colspan=’3′>
<label for='<?php echo wpsc_shipping_quote_html_id(); ?>’><?php echo wpsc_shipping_quote_name(); ?></label>
</td>
<td class=’wpsc_shipping_quote_price wpsc_shipping_quote_price_<?php echo wpsc_shipping_quote_html_id(); ?>’ style=’text-align:center;’>
<label for='<?php echo wpsc_shipping_quote_html_id(); ?>’><?php echo wpsc_shipping_quote_value(); ?></label>
</td>
<td class=’wpsc_shipping_quote_radio wpsc_shipping_quote_radio_<?php echo wpsc_shipping_quote_html_id(); ?>’ style=’text-align:center;’>
<?php if(wpsc_have_morethanone_shipping_methods_and_quotes()): ?>
<input type=’radio’ id='<?php echo wpsc_shipping_quote_html_id(); ?>’ <?php echo wpsc_shipping_quote_selected_state(); ?> onclick=’switchmethod("<?php echo wpsc_shipping_quote_name(); ?>", "<?php echo wpsc_shipping_method_internal_name(); ?>")’ value='<?php echo wpsc_shipping_quote_value(true); ?>’ name=’shipping_method’ />
<?php else: ?>
<input <?php echo wpsc_shipping_quote_selected_state(); ?> disabled=’disabled’ type=’radio’ id='<?php echo wpsc_shipping_quote_html_id(); ?>’ value='<?php echo wpsc_shipping_quote_value(true); ?>’ name=’shipping_method’ />
<?php wpsc_update_shipping_single_method(); ?>
<?php endif; ?>
</td>
</tr>
<?php endwhile; ?>
<?php endwhile; ?>
<?php endif; ?>

<?php wpsc_update_shipping_multiple_methods(); ?>
[/php]