Support » Plugin: WP e-Commerce Related Products » Displaying unrelated products when related products are not available
4 years, 1 month ago
When no related product is available, the plugin is displaying random products. I need to find a way for it to display nothing if there is no related products. I relate products by tag. Help would be greatly appreciated.
Yes, if product doesn’t has any related product, this plugin will show random products. But if you want remove random products, modify “wpec-related-product.php”
$query = array (
'showposts' => $number,
'orderby' => 'rand',
'post_type' => 'wpsc-product',
'post__not_in' => array ($post->ID),
$related_product = new WP_Query($query);
change with this:
Excellent! Worked perfectly! Thanks very much!