/** * wpsc pagination * Page numbers as links - limit by passing the $show parameter. * @param $show (int) Number of pages to show, -1 shows all. Zero will be used to show default setting in a future release. * @return (string) Linked page numbers. */ function wpsc_pagination($show = -1) { global $wpsc_query; $output = ''; $start = 1; $end = $wpsc_query->page_count; $show = intval($show); $current_page = wpsc_current_page(); if ($show > 0) { $start = $current_page - floor($show / 2); if ($start < 1) { $start = 1; } $end = $start + $show - 1; if ($end > $wpsc_query->page_count) { $end = $wpsc_query->page_count; if ($end - $show + 1 > 0) { $start = $end - $show + 1; } } } while (wpsc_have_pages()) { wpsc_the_page(); if (wpsc_page_number() >= $start && wpsc_page_number() <= $end) { $page_url = wpsc_page_url(); $page_url = wpsc_product_search_url($page_url); if (wpsc_page_is_selected()) { $output .= '<a href="' . $page_url . '" class="selected">' . wpsc_page_number() . '</a> '; } else { $output .= '<a href="' . $page_url . '">' . wpsc_page_number() . '</a> '; } } } $wpsc_query->rewind_pages(); return $output; }
if (function_exists('fancy_notifications')) { echo fancy_notifications(); } ?> <?php if (wpsc_has_pages() && (get_option('wpsc_page_number_position') == 2 || get_option('wpsc_page_number_position') == 3)) { ?> <div class='wpsc_page_numbers'> Pages: <?php while ($wpsc_query->have_pages()) { $wpsc_query->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 { ?> <a href='<?php echo htmlentities(wpsc_page_url(), ENT_QUOTES);
<?php endwhile; ?> <?php if(wpsc_product_count() < 1):?> <p><?php echo __('There are no products in this group.', 'wpsc'); ?></p> <?php endif ; ?> </div> <?php if(wpsc_has_pages() && ((get_option('wpsc_page_number_position') == 2) || (get_option('wpsc_page_number_position') == 3))) : ?> <div class='wpsc_page_numbers'> Pages: <?php while ($wpsc_query->have_pages()) : $wpsc_query->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; ?> <?php endif; ?> <?php if(function_exists('fancy_notifications')) { echo fancy_notifications(); }