wpsc_cart_item_name

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

Description: This template tag is used to print out the cart item name you would most likely use it in your cart widget to print the name of the cart item.

Note: This function just returns the cart 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 cart loop
[php] <?php while (wpsc_have_cart_items()) : wpsc_the_cart_item(); ?>[/php]

Code Example:
[php highlight=”3″]
<?php while(wpsc_have_cart_items()): wpsc_the_cart_item(); ?>
<tr>
<td colspan=’2′ class=’product-name’><?php do_action ( "wpsc_before_cart_widget_item_name" ); ?><a href="<?php echo wpsc_cart_item_url(); ?>"><?php echo wpsc_cart_item_name(); ?></a><?php do_action ( "wpsc_after_cart_widget_item_name" ); ?></td>
<td><?php echo wpsc_cart_item_quantity(); ?></td>
<td><?php echo wpsc_cart_item_price(); ?></td>
<td class="cart-widget-remove"><form action="" method="post" class="adjustform">
<input type="hidden" name="quantity" value="0" />
<input type="hidden" name="key" value="<?php echo wpsc_the_cart_item_key(); ?>" />
<input type="hidden" name="wpsc_update_quantity" value="true" />
<input class="remove_button" type="submit" />
</form></td>
</tr>
<?php endwhile; ?>

[/php]