A client of mine needed a feature that could only be solved with a second WP-Ecommerce loop and another feature that required looping WP-Ecommerce out of it’s comfort zone (index.php)
You could use this code for custom loops, for example newest products, top selling products, newest products in a category.
The following code will loop through category ID 18 which in this example is a “Featured on Homepage” category.
<?php $wpsc_query = new WPSC_query("category_id=18"); while (wpsc_have_products()) : wpsc_the_product(); echo ' <div class="cr_cont"> <a href="'.wpsc_the_product_permalink().'"><img src="'.wpsc_the_product_image('57','57').'" alt="" /></a> <span class="rc_in"> <h4><a href="'.wpsc_the_product_permalink().'">'.wpsc_the_product_title().'</a></h4> </span> </div>'; endwhile; ?>
Simple as that. The good thing is that WPSC_query() is available throughout WordPress, so you can put it anywhere you like on the site!