drumm dot info header image 3

wpec cats

	<div class="wpsc_default_product_list">
		<?php /** start the product loop here */?>
        
        
        
<?php
/* Check if this is the products page not the category or single page  */
if( is_products_page() && wpsc_is_product() && (!wpsc_is_in_category()) && (!wpsc_is_single_product()) ) {
    /* Get all the categories for wp e-commerce products */
    $wpec_product_categories = get_terms( 'wpsc_product_category');
    foreach($wpec_product_categories as $wpec_categories){
        $wpec_term_id = $wpec_categories->term_id;
        $wpec_term_name = $wpec_categories->name;
        $wpec_term_slug = $wpec_categories->slug;
 
        //Skip the categories term(which comes default in wp e-commerce
        if($wpec_term_slug == 'categories') {
            continue;
        }
 
        //Set the args array
        $wpec_args = array(
            'post_status' => 'publish',
            'post_type'   => 'wpsc-product',
            'numberposts' => 12,
            'showposts' => 0,
            "wpsc_product_category" => $wpec_term_slug
        );
 
        $wpec_categoryProducts = new WP_Query($wpec_args);
	}
    ?>
        <div class="wpec_productcat_name"><h3><?php echo $wpec_term_name; ?></h3></div>
 
    <?php /** start the category wise - products loop here */?>
    <?php while ($wpec_categoryProducts->have_posts()) : $wpec_categoryProducts->the_post();
        global $wpsc_custom_meta, $wpsc_variations;
        $wpsc_custom_meta = new wpsc_custom_meta( get_the_ID() );
        $wpsc_variations = new wpsc_variations( get_the_ID() );
    ?>
        <div class="default_product_display product_view_<?php echo wpsc_the_product_id(); ?> <?php echo wpsc_category_class(); ?> group">          
               
        
        
        
        

<h2 class="prodtitle entry-title">
							<?php if(get_option('hide_name_link') == 1) : ?>
								<?php echo wpsc_the_product_title(); ?>
							<?php else: ?> 
								<a class="wpsc_product_title" href="<?php echo wpsc_the_product_permalink(); ?>"><?php echo wpsc_the_product_title(); ?></a>
							<?php endif; ?>
						</h2>




        </div><!--close default_product_display-->
    <?php endwhile; ?>
    <?php /** end the product loop here */?>      
 
<?php
}
else {
?>
    <?php /** start the wp e-commerce default product loop here */ ?>
    <?php while (wpsc_have_products()) :  wpsc_the_product(); ?>
        <div class="default_product_display product_view_<?php echo wpsc_the_product_id(); ?> <?php echo wpsc_category_class(); ?> group"> 
 
 
 
 
 <h2 class="prodtitle entry-title">
							<?php if(get_option('hide_name_link') == 1) : ?>
								<?php echo wpsc_the_product_title(); ?>
							<?php else: ?> 
								<a class="wpsc_product_title" href="<?php echo wpsc_the_product_permalink(); ?>"><?php echo wpsc_the_product_title(); ?></a>
							<?php endif; ?>
						</h2>
 
 
 





        </div><!--close default_product_display-->
    <?php endwhile; ?>
    <?php /** end the product loop here */?>  
 
<?php
} //End of else block for products page checking
?>




        
        
        
        
        
		<?php /** end the product loop here */?>
		</div>