Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php /* setting a variable so we can count the loop */ $count = 1; ?>
<?php while (wpsc_have_products()) : wpsc_the_product(); ?>
<?php
/* conditional if this is the first time through the loop */
if ( $count == 1 ) {
/* we show the normal loop for the fist product only */
?>
<!-- regular wp-ecommerce stuff -->
<?php
/* incrementing the starting variable so we can stop the loop and do different things afer */
$count++;
}
endwhile; ?>
<div class="clear"></div>
<div id="slider-controls">
<p class="btn next">&gt;</p>
<p class="btn prev">&lt;</p>
</div><!-- /#slider-controls -->
<div class="slider">
<ul>
<?php while (wpsc_have_products()) : wpsc_the_product(); ?>
<li class="imagecol">
<a rel="<?php echo str_replace(array(" ", '"',"'", '&quot;','&#039;'), array("_", "", "", "",''), wpsc_the_product_title()); ?>" class="image" href="<?php echo wpsc_the_product_permalink(); ?>">
<img class="product_image" width="95px" height="119px" id="product_image_<?php echo wpsc_the_product_id(); ?>" alt="<?php echo wpsc_the_product_title(); ?>" title="<?php echo wpsc_the_product_title(); ?>" src="<?php echo wpsc_the_product_thumbnail(); ?>"/>
</a>
</li><!-- /.imagecol -->
<?php endwhile; ?>
</ul>
</div><!-- /.slider -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment