WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This one is driving me mad! Pagination does not work in that it was displaying the same set of products on every page - now after resaving permalinks (twice as recommended) clicking on page 2 results in the message "There are no products in this group."

I have done everything advised - resaving permalinks, activating and deactivating WPEC, disabling WP Total Cache etc - nothing works (can't find a lot of help out there including on the WPEC forum)

My next shop will be built using a different plugin!)

Any help much appreciated.

share|improve this question

This is a kludge, not a fix. This patch fixes the problem, but doesn't identify why it is happening.

In file


locate the function

function wpsc_display_products_page( $query )

Add the following code just before the WP_QUERY object is created:

    $args['product_tag'] = $query['tag'];

// John Larysz. January 2012
// Patch to get over the problem that Wordpress is not paginating for this site.
     if ( isset($_GET['items_per_page']) && $_GET['items_per_page'] > 0 )
        $args['showposts'] = $_GET['items_per_page'];
     $args['showposts'] = get_option('wpsc_products_per_page');
      if ( isset($_GET['paged']) && $_GET['paged'] > 0 )
         $args['paged'] = $_GET['paged'];
      if ( isset($_GET['product_order']) && strlen($_GET['product_order']) > 0 )
         $args['order'] = $_GET['product_order'];
      if ( isset($_GET['product_search']) && strlen($_GET['product_search']) > 0 )
       $category_list = get_terms('wpsc_product_category','name__like=All Products');
         $args['s'] = $_GET['product_search'];
      $args['wpsc_product_category'] = 'All Products';
         $args['wpsc_product_category__in'] = $category_list[0]->term_taxonomy_id;

// End of patch

$temp_wpsc_query = new WP_Query($args);

// swap the wpsc_query objects
list( $wp_query, $temp_wpsc_query ) = array( $temp_wpsc_query, $wp_query );
$GLOBALS['nzshpcrt_activateshpcrt'] = true;
share|improve this answer

protected by toscho Jul 9 '12 at 21:57

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.