/**
 * wpsc showing products page
 * Displays the number of page showing in the form "5 of 10".
 * @return (string) Number of pages showing.
 */
function wpsc_showing_products_page()
{
    _wpsc_deprecated_function(__FUNCTION__, '3.8');
    global $wpsc_query;
    $output = $wpsc_query->page_count;
    $current_page = wpsc_current_page();
    return $current_page . ' of ' . $output;
}
示例#2
0
/**
 * wpsc showing products page
 * Displays the number of page showing in the form "5 of 10".
 * @return (string) Number of pages showing.
 */
function wpsc_showing_products_page()
{
    global $wpsc_query;
    $output = $wpsc_query->page_count;
    $current_page = wpsc_current_page();
    return $current_page . ' of ' . $output;
}
/**
 * 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;
}