getPathway(); if (!class_exists('VmImage')) require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'image.php'); $virtuemart_manufacturer_id = JRequest::getInt('virtuemart_manufacturer_id', 0); $mf_category_id = JRequest::getInt('mf_category_id', 0); // get necessary models $model = VmModel::getModel('manufacturer'); if ($virtuemart_manufacturer_id !=0 ) { $manufacturer = $model->getManufacturer(); $model->addImages($manufacturer,1); $manufacturerImage = $manufacturer->images[0]->displayMediaThumb('class="manufacturer-image"',false); if (VmConfig::get('enable_content_plugin', 0)) { if(!class_exists('shopFunctionsF'))require(JPATH_VM_SITE.DS.'helpers'.DS.'shopfunctionsf.php'); shopFunctionsF::triggerContentPlugin($manufacturer, 'manufacturer','mf_desc'); } $document->setTitle(JText::_('COM_VIRTUEMART_MANUFACTURER_DETAILS').' '.strip_tags($manufacturer->mf_name)); //added so that the canonical points to page with visible products thx to P2Peter $document->addHeadLink( JUri::getInstance()->toString(array('scheme', 'host', 'port')).JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_manufacturer_id='.$virtuemart_manufacturer_id, FALSE) , 'canonical', 'rel', '' ); $this->assignRef('manufacturerImage', $manufacturerImage); // $this->assignRef('manufacturerProductsURL', $manufacturerProductsURL); $this->assignRef('manufacturer', $manufacturer); $pathway->addItem(strip_tags($manufacturer->mf_name)); $this->setLayout('details'); } else { $document->setTitle(JText::_('COM_VIRTUEMART_MANUFACTURER_PAGE')) ; $manufacturers = $model->getManufacturers(true, true, true); $model->addImages($manufacturers,1); $this->assignRef('manufacturers', $manufacturers); $this->setLayout('default'); } parent::display($tpl); } } // pure php no closing tag