wpsc_update_shipping_single_method

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, its very important that this function gets called within the else condition of the wpsc_have_morethanone_shipping_methods_and_quotes conditional.

There is another function which must be called if the user has more than one shipping quote available to them for selection.

Code Example:
[php highlight=”4″]
<?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; ?>
[/php]