rawProducts); ?>
products as $product): ?>
link = $product['href'];
$productTitleDecorator->name = $product['product_name'];
//cretae products items collection
$productItems = new stdClass();
$productItems->productTitle = $productTitleDecorator;
$productImageDecorator = new stdClass();
$productImageDecorator->imagesExists = true;
if ($currentRawProduct && $currentRawProduct->virtuemart_media_id && $currentRawProduct->virtuemart_media_id[0]) {
if (!class_exists ('TableMedias'))
require(JPATH_VM_ADMINISTRATOR . DS . 'tables' . DS . 'medias.php');
$db = JFactory::getDBO ();
$result = new TableMedias($db);
$result->load((int)$currentRawProduct->virtuemart_media_id[0]);
if (!class_exists ('VmMediaHandler'))
require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'mediahandler.php');
$media = VmMediaHandler::createMedia ($result, 'product');
$productImageDecorator->image = $media;
} else {
$themeUrl = VmConfig::get('vm_themeurl',0);
if(empty($themeUrl)) {
$themeUrl = JURI::root().'components/com_virtuemart/';
}
$src = $themeUrl.'assets/images/vmgeneral/' . VmConfig::get('no_image_set');
$alt = JText::_('COM_VIRTUEMART_NO_IMAGE_SET');
$productImageDecorator->image = '';
}
$productImageDecorator->link = $product['href'];
$productImageDecorator->offsetHeight = 0;
$productImageDecorator->offsetWidth = 0;
$productItems->productImage = $productImageDecorator;
?>