/**
 * wpsc showing products
 * Displays the number of page showing in the form "10 to 20".
 * If only on page is being display it will return the total amount of products showing.
 * @return (string) Number of products showing
 */
function wpsc_showing_products()
{
    global $wpsc_query;
    // If we are using pages...
    if (get_option('use_pagination') == 1) {
        $products_per_page = $wpsc_query->query_vars['number_per_page'];
        if ($wpsc_query->query_vars['page'] > 0) {
            $startnum = ($wpsc_query->query_vars['page'] - 1) * $products_per_page;
        } else {
            $startnum = 0;
        }
        return $startnum + 1 . ' to ' . ($startnum + wpsc_product_count());
    }
    return wpsc_total_product_count();
}
Ejemplo n.º 2
0
				<?php if(get_option('show_category_thumbnails') && wpsc_category_image()) : ?>
					<img src='<?php echo wpsc_category_image(); ?>' alt='<?php echo wpsc_category_name(); ?>' title='<?php echo wpsc_category_name(); ?>' />
				<?php endif; ?>
				
				<?php if(get_option('wpsc_category_description') &&  wpsc_category_description()) : ?>
					<?php echo wpsc_category_description(); ?>
				<?php endif; ?>
			</div>
		<?php endif; ?>
		
		
		<!-- Start Pagination -->
		<?php if ( ( get_option( 'use_pagination' ) == 1 && ( get_option( 'wpsc_page_number_position' ) == 1 || get_option( 'wpsc_page_number_position' ) == 3 ) ) ) : ?>
			<div class="wpsc_page_numbers">
				<?php if ( wpsc_has_pages() ) : ?>
					<div class="pagination-products-showing">Showing <?php echo wpsc_showing_products(); ?> of <?php echo wpsc_total_product_count(); ?> products</div>
					<div class="pagination-pages"><?php echo wpsc_first_products_link( '&laquo; First', true ); ?> <?php echo wpsc_previous_products_link( '&laquo; Previous', true ); ?> <?php echo wpsc_pagination( 10 ); ?> <?php echo wpsc_next_products_link( 'Next &raquo;', true ); ?> <?php echo wpsc_last_products_link( 'Last &raquo;', true ); ?></div>
				<?php endif; ?> 
			</div>
		<?php endif; ?>
		<!-- End Pagination -->
		
		
		<table class="list_productdisplay <?php echo wpsc_category_class(); ?>">
			<?php /** start the product loop here */?>
			<?php $alt = 0;	?>
			<?php while (wpsc_have_products()) :  wpsc_the_product(); ?>
				<?php
				$alt++;
				if ($alt %2 == 1) { $alt_class = 'alt'; } else { $alt_class = ''; }
				?>
Ejemplo n.º 3
0
			<?php endif; ?>
			
			<?php if(get_option('wpsc_category_description') &&  wpsc_category_description()) : ?>
				<?php echo wpsc_category_description(); ?>
			<?php endif; ?>
		</div>
	<?php endif; ?>
		
		
		<!-- Start Pagination -->
		<?php if ( ( get_option( 'use_pagination' ) == 1 && ( get_option( 'wpsc_page_number_position' ) == 1 || get_option( 'wpsc_page_number_position' ) == 3 ) ) ) : ?>
			<div class="wpsc_page_numbers">
				<?php if ( wpsc_has_pages() ) : ?>
					Page <?php echo wpsc_showing_products_page(); ?>: <?php echo wpsc_first_products_link( '&laquo; First', true ); ?> <?php echo wpsc_previous_products_link( '&laquo; Previous', true ); ?> <?php echo wpsc_pagination( 10 ); ?> <?php echo wpsc_next_products_link( 'Next &raquo;', true ); ?> <?php echo wpsc_last_products_link( 'Last &raquo;', true ); ?>
				<?php else : ?>
					Showing all <?php echo wpsc_total_product_count(); ?> products
				<?php endif; ?>
			</div>
		<?php endif; ?>
		<!-- End Pagination -->
		
		
	<?php /** start the product loop here */?>
	<?php while (wpsc_have_products()) :  wpsc_the_product(); ?>
		<div class="productdisplay default_product_display product_view_<?php echo wpsc_the_product_id(); ?> <?php echo wpsc_category_class(); ?>">      
			<div class="textcol">
			
				<?php if(get_option('show_thumbnails')) :?>
					<div class="imagecol">
						<?php if(wpsc_the_product_thumbnail()) :?>
							<a rel="<?php echo str_replace(array(" ", '"',"'", '&quot;','&#039;'), array("_", "", "", "",''), wpsc_the_product_title()); ?>" class="thickbox preview_link" href="<?php echo wpsc_the_product_image(); ?>">
    ?>
		
		
		<!-- Start Pagination -->
		<?php 
    if (get_option('use_pagination') == 1 && (get_option('wpsc_page_number_position') == 1 || get_option('wpsc_page_number_position') == 3)) {
        ?>
			<div class="wpsc_page_numbers">
				<?php 
        if (wpsc_has_pages()) {
            ?>
					<div class="pagination-products-showing">Showing <?php 
            echo wpsc_showing_products();
            ?>
 of <?php 
            echo wpsc_total_product_count();
            ?>
 products</div>
					<div class="pagination-pages"><?php 
            echo wpsc_first_products_link('&laquo; First', true);
            ?>
 <?php 
            echo wpsc_previous_products_link('&laquo; Previous', true);
            ?>
 <?php 
            echo wpsc_pagination(10);
            ?>
 <?php 
            echo wpsc_next_products_link('Next &raquo;', true);
            ?>
 <?php