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

Description: This template tag is used to print the shipping quote name (eg flat rate, weight rate, UPS) this is generally used on for the checkout page to display the name of the shipping method next to the radio buttons

Note: This function just returns the name so to use this function you must use it with an echo to output the name 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 highlight=”4″]
<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 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 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; ?>