function display($tpl = null, $preparecontent = false)
 {
     BookingForConnectorViewOnSellUnitBase::basedisplay($tpl);
     $item = $this->get('Item');
     $document = JFactory::getDocument();
     $language = $document->getLanguage();
     $config = JComponentHelper::getParams('com_bookingforconnector');
     BFCHelper::setState($item, 'onsellunit', 'onsellunit');
     //		$document->addStyleSheet('components/com_bookingforconnector/assets/css/resource.css');
     // add stylesheet
     JHTML::stylesheet('components/com_bookingforconnector/assets/css/bookingfor.css');
     JHTML::stylesheet('components/com_bookingforconnector/assets/css/bookingfor-responsive.css');
     $document->addScript('components/com_bookingforconnector/assets/js/jquery.form.js');
     $document->addScript('components/com_bookingforconnector/assets/js/jquery.blockUI.js');
     $document->addScript('components/com_bookingforconnector/assets/js/bf.js');
     if ($this->checkAnalytics("Sales Resources Page") && $config->get('eecenabled', 0) == 1) {
         $obj = new stdClass();
         $obj->id = "" . $item->ResourceId . " - Sales Resource";
         $obj->name = $item->Name;
         $obj->category = $item->MerchantCategoryName;
         $obj->brand = $item->MerchantName;
         $obj->variant = 'NS';
         $document->addScriptDeclaration('callAnalyticsEEc("addProduct", [' . json_encode($obj) . '], "item");');
     }
     $this->assignRef('document', $document);
     $this->assignRef('language', $language);
     $this->assignRef('item', $item);
     $this->assignRef('config', $config);
     //		$item		= $this->get('Item');
     //$item->Name = $item->nome;
     //$this->setBreadcrumb($item, 'resources');
     $this->setBreadcrumb($item, 'onsellunits', $language);
     parent::display($tpl, true);
 }
 function display($tpl = null, $preparecontent = false)
 {
     BookingForConnectorViewOnSellUnitBase::basedisplay($tpl);
     $item = $this->get('Item');
     $document = JFactory::getDocument();
     $language = $document->getLanguage();
     BFCHelper::setState($item, 'onsellunit', 'onsellunit');
     //		$document->addStyleSheet('components/com_bookingforconnector/assets/css/resource.css');
     // add stylesheet
     JHTML::stylesheet('components/com_bookingforconnector/assets/css/bookingfor.css');
     JHTML::stylesheet('components/com_bookingforconnector/assets/css/bookingfor-responsive.css');
     $document->addScript('components/com_bookingforconnector/assets/js/jquery.form.js');
     $document->addScript('components/com_bookingforconnector/assets/js/jquery.blockUI.js');
     $document->addScript('components/com_bookingforconnector/assets/js/bf.js');
     $this->assignRef('document', $document);
     $this->assignRef('language', $language);
     $this->assignRef('item', $item);
     //		$item		= $this->get('Item');
     //$item->Name = $item->nome;
     //$this->setBreadcrumb($item, 'resources');
     $this->setBreadcrumb($item, 'onsellunits', $language);
     parent::display($tpl, true);
 }