wpsc_cart_item_image

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

Description: This template tag is used to print out the image to the cart item thumbnail – you would most likely use this on your checkout page as part of the display for the cart contents.

The wpsc_cart_item_image accepts two parameters – width and height. If a width and height is specified, it resizes the thumbnail image to that size using the preview code (which caches the thumbnail also)

Note: This function just returns the cart image source so to use this function you must use it with an echo to output the source 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:
No width or height specified
[php highlight=”4″]
<img src="<?php echo wpsc_cart_item_image(); ?>" alt="<?php echo wpsc_cart_item_name(); ?>" title="<?php echo wpsc_cart_item_name(); ?>" class="product_image" />

[/php]

width: 150px height:100px
[php highlight=”4″]
<img src="<?php echo wpsc_cart_item_image(150, 100); ?>" alt="<?php echo wpsc_cart_item_name(); ?>" title="<?php echo wpsc_cart_item_name(); ?>" class="product_image" />

[/php]