Exemplo n.º 1
0
		<div class='wpsc_category_details'>
			<?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; ?>
	
	
	<?php if(wpsc_has_pages() && ((get_option('wpsc_page_number_position') == 1 ) || (get_option('wpsc_page_number_position') == 3)))  : ?>
		<div class='wpsc_page_numbers'>
		  Pages: 
			<?php while (wpsc_have_pages()) : wpsc_the_page(); ?>
				<?php if(wpsc_page_is_selected()) :?> 	   
					<a href='<?php echo wpsc_page_url(); ?>' class='selected'><?php echo wpsc_page_number(); ?></a>
				<?php else: ?> 
					<a href='<?php echo wpsc_page_url(); ?>'><?php echo wpsc_page_number(); ?></a>
				<?php endif; ?> 
			<?php endwhile; ?>
		</div>
	<?php endif; ?>
	


	<div class="product_grid_display">
		<?php while (wpsc_have_products()) :  wpsc_the_product(); ?>
			<div class="product_grid_item product_view_<?php echo wpsc_the_product_id(); ?>">
			
Exemplo n.º 2
0
            ?>
				<?php 
        }
        ?>
			</div>
		<?php 
    }
    ?>
		
		<?php 
    if (wpsc_has_pages() && (get_option('wpsc_page_number_position') == 1 || get_option('wpsc_page_number_position') == 3)) {
        ?>
			<div class='wpsc_page_numbers'>
				Pages:
				<?php 
        while (wpsc_have_pages()) {
            wpsc_the_page();
            ?>
					<?php 
            if (wpsc_page_is_selected()) {
                ?>
 	   
					<a href='<?php 
                echo htmlentities(wpsc_page_url(), ENT_QUOTES);
                ?>
' class='selected'><?php 
                echo wpsc_page_number();
                ?>
</a>
				<?php 
            } else {
/**
 * wpsc last products link
 * Links to the last page of products on a category or group page.
 * @param $text (string) Link text.
 * @param $show_disabled (bool) Show unlinked text if first page.
 * @return (string) Last page link or text.
 */
function wpsc_last_products_link($text = 'Last', $show_disabled = false)
{
    global $wpsc_query;
    $page_url = '';
    while (wpsc_have_pages()) {
        wpsc_the_page();
        $page_url = wpsc_page_url();
    }
    $wpsc_query->rewind_pages();
    $page_url = wpsc_product_search_url($page_url);
    if ($page_url && wpsc_current_page() < $wpsc_query->page_count) {
        return '<a href="' . $page_url . '">' . $text . '</a>';
    }
    if ($show_disabled) {
        return '<span>' . $text . '</span>';
    }
    return;
}