getPathway(); $layoutName = $this->getLayout(); $model = VmModel::getModel(); $virtuemart_vendor_id = JRequest::getInt('virtuemart_vendor_id'); // if ($layoutName=='default') { if (empty($virtuemart_vendor_id)) { $document->setTitle( JText::_('COM_VIRTUEMART_VENDOR_LIST') ); $pathway->addItem(JText::_('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(JPATH_VM_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(JPATH_VM_ADMINISTRATOR.DS.'models'.DS.'vendor.php'); $userId = VirtueMartModelVendor::getUserIdByVendorId($virtuemart_vendor_id); //$usermodel = VmModel::getModel('user'); //$virtuemart_userinfo_id = $usermodel->getBTuserinfo_id($userId); //$usermodel->getVendor($virtuemart_vendor_id); //$userFields = $usermodel->getUserInfoInUserFields($layoutName, 'BT', $virtuemart_userinfo_id,true,true); //$this->assignRef('userFields', $userFields); if ($layoutName=='tos') { $document->setTitle( JText::_('COM_VIRTUEMART_VENDOR_TOS') ); $pathway->addItem(JText::_('COM_VIRTUEMART_VENDOR_TOS')); } elseif ($layoutName=='contact') { $user = JFactory::getUser(); $document->setTitle( JText::_('COM_VIRTUEMART_VENDOR_CONTACT') ); $pathway->addItem(JText::_('COM_VIRTUEMART_VENDOR_CONTACT')); $this->assignRef('user', $user); } else { $document->setTitle( JText::_('COM_VIRTUEMART_VENDOR_DETAILS') ); $pathway->addItem(JText::_('COM_VIRTUEMART_VENDOR_DETAILS')); $this->setLayout('details'); } $linkdetails = ''.JText::_('COM_VIRTUEMART_VENDOR_DETAILS').''; $linkcontact = ''.JText::_('COM_VIRTUEMART_VENDOR_CONTACT').''; $linktos = ''.JText::_('COM_VIRTUEMART_VENDOR_TOS').''; //$this->assignRef('lineSeparator', $lineSeparator); $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 = JRequest::getString('comment'); $virtuemart_vendor_id = JRequest::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 = JText::_('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); parent::display( ); } } //No Closing Tag