setMainTable('worldzones'); } /** * Retrieve the detail record for the current $id if the data has not already been loaded. * * @author RickG */ function getShipmentZone() { $db = JFactory::getDBO(); if (empty($this->_data)) { $query = 'SELECT * '; $query .= 'FROM `#__virtuemart_worldzones` '; $query .= 'WHERE `virtuemart_worldzone_id` = ' . (int)$this->_id; $db->setQuery($query); $this->_data = $db->loadObject(); } if (!$this->_data) { $this->_data = new stdClass(); $this->_id = 0; $this->_data = null; } return $this->_data; } /** * Retrieve a list of zone ids and zone names for use in a HTML select list. * * @author RickG */ function getWorldZonesSelectList() { $db = JFactory::getDBO(); $query = 'SELECT `virtuemart_worldzone_id`, `zone_name` '; $query .= 'FROM `#__virtuemart_worldzones`'; $db->setQuery($query); return $db->loadObjectList(); } } // pure php no closing tag