/**
  * Display method
  *
  * @param string $tpl
  * @return null
  */
 public function display($tpl = null, $prepare = true)
 {
     // Automatically fetch items, total and pagination - and assign them to the template
     $this->fetchItems();
     // Prepare the items for display
     if (!empty($this->items)) {
         foreach ($this->items as $index => $item) {
             $item->edit_link = 'index.php?option=com_magebridge&view=product&task=edit&cid[]=' . $item->id;
             $this->items[$index] = $item;
         }
     }
     parent::display($tpl);
 }
 /**
  * Display method
  *
  * @param string $tpl
  * @return null
  */
 public function display($tpl = null)
 {
     // Fetch the items
     $this->fetchItems();
     // Prepare the items for display
     if (!empty($this->items)) {
         foreach ($this->items as $index => $item) {
             $item->magento_group_label = $this->getCustomergroupLabel($item->magento_group);
             $item->joomla_group_label = $this->getUsergroupLabel($item->joomla_group);
             $this->items[$index] = $item;
         }
     }
     parent::display($tpl);
 }
 public function display($tpl = null, $prepare = true)
 {
     // Automatically fetch items, total and pagination - and assign them to the template
     $this->fetchItems();
     // Set toolbar items for the page
     MageBridgeToolBarHelper::help('magebridge.products');
     // Custom filters
     $this->lists['connector'] = $this->selectConnector($this->getFilter('connector'));
     // Prepare the items for display
     if (!empty($this->items)) {
         foreach ($this->items as $index => $item) {
             $item->edit_link = 'index.php?option=com_magebridge&view=product&task=edit&cid[]=' . $item->id;
             $this->items[$index] = $item;
         }
     }
     parent::display($tpl);
 }
 public function display($tpl = null)
 {
     // Automatically fetch items, total and pagination - and assign them to the template
     $this->fetchItems();
     // Toolbar options
     $this->loadToolbarEdit = false;
     $this->loadToolbarDelete = false;
     JToolBarHelper::custom('delete', 'delete', '', 'Truncate', false);
     JToolBarHelper::custom('refresh', 'preview', '', 'Refresh', false);
     JToolBarHelper::custom('export', 'archive', '', 'Export', false);
     // Custom filters
     $this->lists['remote_addr'] = $this->selectRemoteAddress($this->getFilter('remote_addr'));
     $this->lists['type'] = $this->selectType($this->getFilter('type'));
     $this->lists['origin'] = $this->selectOrigin($this->getFilter('origin'));
     // If debugging is enabled report it
     if ($this->countLogs() > 1000) {
         MageBridgeModelDebug::getInstance()->feedback('There are currently ' . (int) $this->countLogs() . ' log-records in the database. We recommend you delete these logs.');
     }
     parent::display($tpl);
 }
 /**
  * Display method
  *
  * @param string $tpl
  * @return null
  */
 public function display($tpl = null)
 {
     // Automatically fetch items, total and pagination - and assign them to the template
     $this->fetchItems();
     // Toolbar options
     $this->loadToolbarEdit = false;
     $this->loadToolbarDelete = false;
     JToolBarHelper::custom('delete', 'delete', '', 'COM_MAGEBRIDGE_VIEW_LOGS_TOOLBAR_TRUNCATE', false);
     JToolBarHelper::custom('refresh', 'preview', '', 'COM_MAGEBRIDGE_VIEW_LOGS_TOOLBAR_REFRESH', false);
     JToolBarHelper::custom('export', 'archive', '', 'COM_MAGEBRIDGE_VIEW_LOGS_TOOLBAR_EXPORT', false);
     // Custom filters
     $this->lists['remote_addr'] = $this->selectRemoteAddress($this->getFilter('remote_addr'));
     $this->lists['type'] = $this->selectType($this->getFilter('type'));
     $this->lists['origin'] = $this->selectOrigin($this->getFilter('origin'));
     // If debugging is enabled report it
     if ($this->countLogs() > 1000) {
         MageBridgeModelDebug::getInstance()->feedback(JText::sprintf('COM_MAGEBRIDGE_VIEW_LOGS_FLOOD_WARNING', (int) $this->countLogs()));
     }
     parent::display($tpl);
 }
 public function display($tpl = null)
 {
     // Set extra toolbar items for the page
     JToolBarHelper::preferences('com_simplelists', '480');
     //JToolBarHelper::help( 'screen.simplelist' );
     // Preliminary check to see if any categories have been configured yet
     SimplelistsHelper::checkCategories();
     // Automatically fetch items, total and pagination - and assign them to the template
     $this->fetchItems();
     // Prepare data for each simplelists item
     foreach ($this->items as $index => $item) {
         $item->categories = SimplelistsHelper::getCategories($item->id);
         $item->edit_link = JRoute::_('index.php?option=com_simplelists&view=item&task=edit&cid[]=' . $item->id);
         $this->items[$index] = $item;
     }
     // build list of categories
     $category_id_params = array('current' => $this->getFilter('category_id'), 'javascript' => 1, 'nullvalue' => 1);
     $this->lists['category_id'] = SimplelistsHTML::selectCategories('filter_category_id', $category_id_params);
     $this->lists['link_type'] = SimplelistsHTML::selectLinkType($this->getFilter('link_type'));
     parent::display($tpl);
 }
 /**
  * Method to prepare the content for display
  */
 public function display($tpl = null)
 {
     // Fetch the items
     $this->fetchItems();
     // Prepare the items for display
     if (!empty($this->items)) {
         foreach ($this->items as $index => $item) {
             $item->custom_edit_link = 'index.php?option=com_magebridge&view=store&task=edit&cid[]=' . $item->id;
             $this->items[$index] = $item;
         }
     }
     // Append the default Store Relation
     $default = $this->getDefault();
     if (!empty($default)) {
         if (empty($this->items)) {
             $this->items = array($default);
         } else {
             array_unshift($this->items, $default);
         }
     }
     parent::display($tpl);
 }