White page on the composant with this code :
//join all language tables, because we search in all languages and we need at least one translation
$joins = $wheres = $selects = array();
foreach (self::getVm2LanguageTable('#__virtuemart_products', -1) as $o => $tableName){
$selects[] = '`'.$tableName.'`.product_name AS product_name_'.substr($tableName, -5);
$joins[] = 'LEFT JOIN `'.$tableName.'` ON (p.virtuemart_product_id = `'.$tableName.'`.virtuemart_product_id)';
$wheres[] = '`'.$tableName.'`.`product_name` LIKE '.$db->Quote('%' . $filter . '%').'';
}
$db->setQuery('SELECT p.`virtuemart_product_id` AS `id`, p.`product_sku`,
p.product_in_stock, p.product_ordered, '.implode(', ', $selects).'
FROM `#__virtuemart_products` AS p '.implode(' ', $joins).'
WHERE '.implode(' OR ', $wheres).' OR p.`product_sku` LIKE ' . $db->Quote('%'.$filter.'%').' OR p.`product_barcode` LIKE ' .
$db->Quote($filter).' OR p.`product_isbn` LIKE ' . $db->Quote($filter). ,0,50);
}
else
$db->setQuery('SELECT `product_id` AS `id`,`product_name`, `product_sku`, product_in_stock
FROM `#__vm_product`
WHERE `product_name` LIKE ' . $db->Quote('%' . $filter . '%').' OR `product_sku` LIKE ' . $db->Quote('%' . $filter . '%'),0,50);
$res = $db->loadObjectList();
if (COM_VMINVOICE_ISVM2)
self::pickTranslation($res, 'product_name', $lang); //pick proper translation of product name
foreach ($res as $product)
Thanks