Open - administrator/components/com_virtuemart/models/product.php
Find the exact following codes between lines 473 to 479:
if(!empty($cats)){
$joinCategory = TRUE;
$cats .= $virtuemart_category_id;
$where[] = ' `pc`.`virtuemart_category_id` IN ('.$cats.') ';
} else {
$where[] = ' `pc`.`virtuemart_category_id` = ' . $virtuemart_category_id;
}
Replace above by:
if(!empty($cats)) {
$joinCategory = TRUE;
$cats .= $virtuemart_category_id;
$where[] = ' `pc`.`virtuemart_category_id` IN ('.$cats.') ';
} else {
if(is_array($virtuemart_category_id)) {
$category_id = array_filter(array_map('intval', $virtuemart_category_id));
if(!empty($category_id))
{
$where[] = ' `pc`.`virtuemart_category_id` IN (' . implode(',', $category_id) . ')';
}
} else {
$where[] = ' `pc`.`virtuemart_category_id` = ' . $virtuemart_category_id;
}
}
This will fix the issue for the time being. A permanent solution is expected in the next release.