Get Products For Active Vendors Only

How can we get products data for vendors who are active ?

list($products, $search) = fn_get_products($params, 4000);
fn_gather_additional_products_data($products, array('get_icon' => false, 'get_detailed' => true, 'get_additional' => false, 'detailed_params' => false, 'get_options'=> false));
$company_condition = '';
if (fn_allowed_for('MULTIVENDOR')) {
if ($params['area'] == 'C') {
$company_condition .= " AND companies.status = 'A' ";
$params['extend'][] = 'companies';
} else {
$company_condition .= fn_get_company_condition('products.company_id');
}
} else {
$cat_company_condition = '';
if (Registry::get('runtime.company_id')) {
$params['extend'][] = 'categories';
$cat_company_condition .= fn_get_company_condition('?:categories.company_id');
} elseif (!empty($params['company_ids'])) {
$params['extend'][] = 'categories';
$cat_company_condition .= db_quote(' AND ?:categories.company_id IN (?n)', explode(',', $params['company_ids']));
}
$company_condition .= $cat_company_condition;
}
As per Default code its provide All Active Vendor Product in Frontend. & all Product at backend.


Can you write here where you not getting active vendor product.

What area do you use to test this code - store-front or admin panel?

store front

What area do you use to test this code - store-front or admin panel?

In this case you should not see products from non-active vendors.