public function getList($refresh = false) { $list = parent::getList($refresh); // If no item in the list, return an array() if (empty($list)) { return array(); } return $list; }
public function getList($refresh = false) { $list = parent::getList($refresh); if (empty($list)) { return $list; } foreach ($list as $item) { $item->link = 'index.php?option=com_tienda&view=productcomments&task=edit&id=' . $item->productcomment_id; } return $list; }
public function getList($refresh = false) { $list = parent::getList($refresh); foreach ($list as $item) { if (version_compare(JVERSION, '1.6.0', 'ge')) { $item->id = $item->extension_id; } $item->link = 'index.php?option=com_tienda&view=reports&task=view&id=' . $item->id; } return $list; }
public function getList($refresh = false) { $list = parent::getList($refresh); // If no item in the list, return an array() if (empty($list)) { return array(); } foreach ($list as $item) { $item->link = "index.php?option=com_tienda&controller=taxrates&view=taxrates&tmpl=component&task=edit&classid={$item->tax_class_id}&id={$item->tax_rate_id}"; } return $list; }
public function getList() { $list = parent::getList(); // If no item in the list, return an array() if (empty($list)) { return array(); } foreach ($list as $item) { $item->link_remove = 'index.php?option=com_tienda&task=doTask&elementTask=delete&cid[]=' . $item->shipping_rate_weightbased_id; } return $list; }
public function getList($refresh = false) { $list = parent::getList($refresh); // If no item in the list, return an array() if (empty($list)) { return array(); } foreach ($list as $item) { $item->link_remove = 'index.php?option=com_tienda&controller=shippingrates&task=delete&cid[]=' . $item->shipping_rate_id; } return $list; }
public function getList() { $list = parent::getList(); // If no item in the list, return an array() if (empty($list)) { return array(); } foreach ($list as $item) { $item->link = 'index.php?option=com_tienda&view=shipping&task=view&id=' . JRequest::getInt('id') . '&shippingTask=edit&sid=' . $item->service_id; } return $list; }
public function getList($refresh = false) { $list = parent::getList($refresh); // If no item in the list, return an array() if (empty($list)) { return array(); } foreach ($list as $item) { $item->link = 'index.php?option=com_tienda&view=shipping&task=view&id=' . @$_GET['id'] . '&shippingTask=view&sid=' . $item->shipping_method_id; } return $list; }
public function getList($refresh = false) { $list = parent::getList(); // If no item in the list, return an array() if (empty($list)) { return array(); } foreach ($list as $item) { $item->link = 'index.php?option=com_tienda&controller=orderstates&view=orderstates&task=edit&id=' . $item->order_state_id; } return $list; }
public function getList($refresh = false) { $list = parent::getList($refresh); foreach (@$list as $item) { if (version_compare(JVERSION, '1.6.0', 'ge')) { // Joomla! 1.6+ code here $item->id = $item->extension_id; } $item->link = 'index.php?option=com_tienda&view=shipping&task=view&id=' . $item->id; $item->link_edit = 'index.php?option=com_tienda&view=shipping&task=edit&id=' . $item->id; } return $list; }
public function getList($refresh = false) { $list = parent::getList($refresh); // If no item in the list, return an array() if (empty($list)) { return array(); } foreach (@$list as $item) { $item->link = 'index.php?option=com_tienda&controller=geozones&view=geozones&task=edit&id=' . $item->geozone_id; $item->link_zones = 'index.php?option=com_tienda&view=geozones&task=selectzones&tmpl=component&id=' . $item->geozone_id; $item->link_plugins = 'index.php?option=com_tienda&view=geozones&task=selectplugins&type=' . $item->geozonetype_id . '&tmpl=component&id=' . $item->geozone_id; } return $list; }
public function getList($refresh = false) { if (empty($this->_list) || $refresh) { $list = parent::getList($refresh); $nullDate = JFactory::getDBO()->getNullDate(); if (empty($list)) { return array(); } foreach ($list as $item) { // convert working dates to localtime for display $item->publishing_date = $item->publishing_date != $nullDate ? JHTML::_("date", $item->publishing_date, '%Y-%m-%d %H:%M:%S') : $item->publishing_date; } $this->_list = $list; } return $this->_list; }
public function getList($refresh = false) { if (empty($this->_list) || $refresh) { $list = parent::getList($refresh); $nullDate = JFactory::getDBO()->getNullDate(); if (empty($list)) { return array(); } foreach ($list as $item) { $item->link_remove = 'index.php?option=com_tienda&controller=productprices&task=delete&cid[]=' . $item->product_price_id; /* // convert working dates to localtime for display $item->product_price_startdate = ($item->product_price_startdate != $nullDate) ? JHTML::_( "date", $item->product_price_startdate, '%Y-%m-%d %H:%M:%S' ) : $item->product_price_startdate; $item->product_price_enddate = ($item->product_price_enddate != $nullDate) ? JHTML::_( "date", $item->product_price_enddate, '%Y-%m-%d %H:%M:%S' ) : $item->product_price_enddate; */ } $this->_list = $list; } return $this->_list; }
public function getList($emptyState = true) { JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_tienda/tables'); $list = parent::getList($emptyState); // If no item in the list, return an array() if (empty($list)) { return array(); } foreach ($list as $item) { if ($product_attributes = explode(',', $item->product_attributes)) { $product_attribute_names = array(); foreach ($product_attributes as $pao_id) { $pao = JTable::getInstance('ProductAttributeOptions', 'TiendaTable'); $pao->load($pao_id); $product_attribute_names[] = JText::_($pao->productattributeoption_name); } $item->product_attribute_names = implode(', ', $product_attribute_names); } } return $list; }
public function getList($refresh = false) { $list = parent::getList($refresh); // If no item in the list, return an array() if (empty($list)) { return array(); } $filter_zip = $this->getState('filter_zip'); foreach ($list as $key => $item) { // Check the zip range if (strlen($filter_zip)) { $in_range = false; $ranges = explode(";", $item->zip_range); if (empty($item->zip_range)) { // no zip range defined, so assume the geozone covers all of them $in_range = true; } foreach ($ranges as $range) { if (strlen($range)) { $temp = explode("-", $range); $start = $temp[0]; $end = $temp[1]; // check that it is in range if ($filter_zip <= $end && $filter_zip >= $start) { $in_range = true; } elseif ($filter_zip == $start) { $in_range = true; } } } // in not in the ranges, unset it if (!$in_range) { unset($list[$key]); } } $item->link = "index.php?option=com_tienda&controller=zonerelations&view=zonerelations&tmpl=component&task=edit&geozoneid={$item->geozone_id}&id={$item->zonerelation_id}"; } return $list; }
public function getList($refresh = false) { $list = parent::getList($refresh); // If no item in the list, return an array() if (empty($list)) { return array(); } foreach ($list as $item) { $item->slug = $item->category_alias ? ":{$item->category_alias}" : ""; $item->link = 'index.php?option=com_tienda&view=categories&task=edit&id=' . $item->category_id; } return $list; }
public function getList($refresh = false) { Tienda::load('TiendaHelperBase', 'helpers._base'); $list = parent::getList($refresh); // If no item in the list, return an array() if (empty($list)) { return array(); } foreach ($list as $item) { $item->link = 'index.php?option=com_tienda&view=orderpayments&task=edit&id=' . $item->orderpayment_id; } return $list; }
public function getList($refresh = false) { if (empty($this->_list)) { Tienda::load('TiendaHelperBase', 'helpers._base'); $list = parent::getList($refresh); // If no item in the list, return an array() if (empty($list)) { return array(); } $amigos = TiendaHelperBase::getInstance('Amigos'); $currency_helper = TiendaHelperBase::getInstance('Currency'); foreach (@$list as $item) { if ($item->user_id < Tienda::getGuestIdStart()) { if (strlen($item->billing_first_name) || strlen($item->billing_last_name)) { $item->user_name = JText::_('COM_TIENDA_GUEST') . ' - ' . $item->billing_first_name . ' ' . $item->billing_last_name; } else { $item->user_name = JText::_('COM_TIENDA_GUEST') . ' - ' . $item->userinfo_email; } } $item->link = 'index.php?option=com_tienda&controller=orders&view=orders&task=edit&id=' . $item->order_id; $item->link_view = 'index.php?option=com_tienda&view=orders&task=view&id=' . $item->order_id; // retrieve the order's currency // this loads the currency, using the FK is it is the same of the // currency used in the order, or the DSCParameter currency of the order otherwise $order_currency = new DSCParameter($item->order_currency); $order_currency = $order_currency->toArray(); //JModel::addIncludePath( JPATH_ADMINISTRATOR.'/components/com_tienda/models' ); //$cmodel = JModel::getInstance( 'Currencies', 'TiendaModel' ); //$cmodel->setId($item->currency_id); $item->currency = $currency_helper->load($item->currency_id); // if the order currency is not the same as it was during the order if (!empty($item->currency) && !empty($order_currency['currency_code']) && $item->currency->currency_code != $order_currency['currency_code']) { // overwrite it with the original one foreach (@$order_currency as $k => $v) { $item->currency->{$k} = $v; } } // has a commission? if ($amigos->isInstalled()) { $item->commissions = $amigos->getCommissions($item->order_id); } } $this->_list = $list; } return $this->_list; }
public function getList($refresh = false) { Tienda::load('TiendaHelperBase', 'helpers._base'); $list = parent::getList($refresh); // If no item in the list, return an array() if (empty($list)) { return array(); } $db = JFactory::getDbo(); Tienda::load('TiendaQuery', 'library.query'); $q = new TiendaQuery(); $q->select('order_hash'); $q->from('#__tienda_orders'); Tienda::load('TiendaHelperSubscription', 'helpers.subscription'); foreach ($list as $item) { $item->link = 'index.php?option=com_tienda&view=subscriptions&task=edit&id=' . $item->subscription_id; $item->link_view = 'index.php?option=com_tienda&view=subscriptions&task=view&id=' . $item->subscription_id; $item->history = TiendaHelperSubscription::getHistory($item->subscription_id); $q->_where = null; $q->where('order_id = ' . $item->order_id); $db->setQuery($q); $item->order_hash = $db->loadResult(); } return $list; }
/** * Get the list of items. If needed, loads the attributes for each item * * @param boolean $refresh * @param boolean $getEav * @param array $options; keys: include, exclude; includes or excludes eav attributes from loading. Use their alias */ public function getList($refresh = false, $getEav = true, $options = array()) { $this->_getEav = $getEav; $this->_getEavOptions = $options; return parent::getList($refresh); }
public function getList($emptyState = true) { if (empty($this->_list)) { $list = parent::getList($emptyState); // If no item in the list, return an array() if (empty($list)) { return array(); } foreach (@$list as $item) { $item->productfile_path = $this->correctPath($item->productfile_path); } $this->_list = $list; } return $this->_list; }
public function getList($refresh = false) { $list = parent::getList($refresh); foreach ($list as $item) { $item->link = 'index.php?option=com_tienda&controller=users&view=users&task=view&id=' . $item->id; $item->link_createorder = 'index.php?option=com_tienda&view=orders&task=add&userid=' . $item->id; } return $list; }