Display sticky “featured” products in wp ecommerce

WP Ecommerce is a free and great online shopping cart wordpress plugins that will let you easily build up online shopping site and to sell your products & services easily on online selling platform.

During work of converting WP Woo commerce supported theme to WP Ecoomerce theme i need to display featured product as well as latest product. here i sharing WP ecommerce script.
To get latest few sticky products or a featured products in wp ecommerce.

#
 $sticky_array,
   'post_type' => 'wpsc-product',
   'posts_per_page' => 5,
   'orderby' => 'menu_order',
  'order' => 'ASC',
);
$featured = new WP_Query( $args );

while ( $featured->have_posts() ) : $featured_query->the_post();
   $post_id = get_the_ID();
   $post_name = get_the_title();
endwhile;

?>

Similarly to get latest products in wp ecommerce use the below scripting code as Query arguments.

#
 'wpsc-product',
   'numberposts' => 10,
   'orderby' => 'menu_order',
   'post_parent' => 0,
   'post_status' => 'publish',
   'order' => 'ASC'
);
?>

And, in case if you store your product related any information in postmeta and want to get that post list

#
 'wpsc-product',
     'meta_key'  => $key,
     'meta_value' => 'metakeyvalue',
     'ignore_sticky_posts'=> 1,
     'no_found_rows'=> 1,
     'posts_per_page'=> 20,
     'orderby'=> 'menu_order'
);  
?>

Leave a Comment

Scroll to Top