wpsc_shipping_quote_selected_state

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

Description: This template tag is used to check the state the radio buttons for the shipping quotes, it will either print “checked = checked” (if the quote is checked) or leave it blank if its unchecked.

You would need to use this in your radio buttons on the shipping selection part of the checkout page template.

Note: This function just returns the value so to use this function you must use it with an echo to output the value to the browser. It must also be used within the shipping loop.

[php] <?php while (wpsc_have_shipping_quotes()) : wpsc_the_shipping_quote(); ?>[/php]

Code Example:
[php]
<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]