这是一个难题,不是修复。此修补程序修复了此问题,但无法确定发生此问题的原因。
在文件中
wp-content\\plugins\\wp-e-commerce\\wpsc-includes\\theme.functions.php
定位功能
function wpsc_display_products_page( $query )
在创建WP\\U查询对象之前添加以下代码:
if(!empty($query[\'tag\'])){
$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\'];
}
else
{
$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;