wpsc_the_product_thumbnail

Located in: product-template.php
Version Introduced: 3.8
Accepted Parameters: width (default – product image width), height (default – product image height), product_id (default – 0 – if used within the loop then you dont need to specify the id), page (default – products-page)

Description: This template tag is used print the url to the product thumbnail – you can also use it as a conditional tag first to check if the product has thumbnail.

This tag in not required to be used within the product loop as you can specify the product_id, width and height will just be the defaults but if you want to change these for your layout then you can use the width and height parameters.

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.

[php] <?php while (wpsc_have_products()) : wpsc_the_product(); ?>[/php]

Code Example:
print out the product thubmnail 150 x 150 on the single products page
[php]<img class=”product_image” id=”product_image_” alt=”” title=”” src=”<?php echo wpsc_the_product_thumbnail( 150, 150); “>?>[/php]