getPathway(); $layoutName = $this->getLayout(); $model = VmModel::getModel(); $virtuemart_vendor_id = vRequest::getInt('virtuemart_vendor_id',1); // if ($layoutName=='default') { if (empty($virtuemart_vendor_id)) { $document->setTitle( vmText::_('COM_VIRTUEMART_VENDOR_LIST') ); $pathway->addItem(vmText::_('COM_VIRTUEMART_VENDOR_LIST')); $vendors = $model->getVendors(); $model->addImages($vendors); $this->assignRef('vendors', $vendors); } else { $vendor = $model->getVendor($virtuemart_vendor_id); $model->addImages($vendor); if (VmConfig::get ('enable_content_plugin', 0)) { if(!class_exists('shopFunctionsF'))require(VMPATH_SITE.DS.'helpers'.DS.'shopfunctionsf.php'); shopFunctionsF::triggerContentPlugin($vendor, 'vendor','vendor_store_desc'); shopFunctionsF::triggerContentPlugin($vendor, 'vendor','vendor_terms_of_service'); } $this->assignRef('vendor', $vendor); if(!class_exists('VirtueMartModelVendor')) require(VMPATH_ADMIN.DS.'models'.DS.'vendor.php'); $userId = VirtueMartModelVendor::getUserIdByVendorId($virtuemart_vendor_id); if ($layoutName=='tos') { $customtitle = vmText::_('COM_VIRTUEMART_VENDOR_TOS'); $pathway->addItem(vmText::_('COM_VIRTUEMART_VENDOR_TOS')); } elseif ($layoutName=='contact') { $user = JFactory::getUser(); $customtitle = vmText::_('COM_VIRTUEMART_VENDOR_CONTACT'); $pathway->addItem(vmText::_('COM_VIRTUEMART_VENDOR_CONTACT')); $this->assignRef('user', $user); } else { $customtitle = vmText::_('COM_VIRTUEMART_VENDOR_DETAILS'); $pathway->addItem(vmText::_('COM_VIRTUEMART_VENDOR_DETAILS')); $this->setLayout('details'); } $metadesc = ''; $metakey = ''; $metarobot = ''; $metaauthor = ''; if(!empty($this->vendor->metadesc)) $metadesc = $this->vendor->metadesc; if(!empty($this->vendor->metakey)) $metakey = $this->vendor->metakey; if(!empty($this->vendor->metarobot)) $metarobot = $this->vendor->metarobot; if(!empty($this->vendor->metaauthor)) $metaauthor = $this->vendor->metaauthor; $menus = $mainframe->getMenu(); $menu = $menus->getActive(); if(!empty($menu)){ $metadesc = !empty($menu->params->get('menu-meta_description')) ? $menu->params->get('menu-meta_description') : $metadesc; $metakey = !empty($menu->params->get('menu-meta_keywords')) ? $menu->params->get('menu-meta_keywords') : $metakey; $metarobot = !empty($menu->params->get('robots')) ? $menu->params->get('robots') : $metarobot; $customtitle = !empty($menu->params->get('page_title')) ? $menu->params->get('page_title') : $customtitle; if(!empty($customtitle)){ $document->setTitle( $customtitle ); if ($mainframe->getCfg('MetaTitle') == '1') { $document->setMetaData('title', $customtitle); } } } $document->setMetaData('description',$metadesc); $document->setMetaData('keywords', $metakey); $document->setMetaData('robots', $metarobot); if ($mainframe->getCfg('MetaAuthor') == '1' and !empty($metaauthor)) { $document->setMetaData('author', $metaauthor); } $linkdetails = ''.vmText::_('COM_VIRTUEMART_VENDOR_DETAILS').''; $linkcontact = ''.vmText::_('COM_VIRTUEMART_VENDOR_CONTACT').''; $linktos = ''.vmText::_('COM_VIRTUEMART_VENDOR_TOS').''; $this->assignRef('linkdetails', $linkdetails); $this->assignRef('linkcontact', $linkcontact); $this->assignRef('linktos', $linktos); } parent::display($tpl); } function renderMailLayout($doVendor, $recipient) { $this->setLayout('mail_html_question'); $this->comment = vRequest::getString('comment'); $virtuemart_vendor_id = vRequest::getInt('virtuemart_vendor_id'); $this->doVendor=$doVendor; //$this->doVendor=TRUE; $vendorModel = VmModel::getModel('vendor'); $this->vendor = $vendorModel->getVendor($virtuemart_vendor_id); // in this particular case, overwrite the value for fix the recipient name $this->vendor->vendor_name= $this->user['name']; $this->subject = vmText::_('COM_VIRTUEMART_VENDOR_CONTACT') .' '.$this->user['name']; $this->vendorEmail= $this->user['email']; //$this->vendorName= $this->user['email']; if (VmConfig::get('order_mail_html')) { $tpl = 'mail_html_question'; } else { $tpl = 'mail_raw_question'; } $this->setLayout($tpl); $this->isMail = true; parent::display( ); } } //No Closing Tag