Location: PHPKode > projects > HikaShop > back/types/order.php
<?php
/**
 * @package		HikaShop for Joomla!
 * @version		1.4.3
 * @author		hikashop.com
 * @copyright	(C) 2010 HIKARI SOFTWARE. All rights reserved.
 * @license		GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?>
<?php
class hikashopOrderType{
	function load($type){
		$query = 'SELECT * FROM '.hikashop::table($type).' LIMIT 1';
		$database =& JFactory::getDBO();
		$database->setQuery($query);
		$object = $database->loadObject();
		$this->values = array();
		if($type=='product'){
			$this->values[] = JHTML::_('select.option', 'ordering','ordering');
		}
		if(!empty($object)){
			foreach(get_object_vars($object) as $key => $val){
				$this->values[] = JHTML::_('select.option', $key,$key);
			}
		}
	}
	function display($map,$value,$type){
		$this->load($type);
		return JHTML::_('select.genericlist',   $this->values, $map, 'class="inputbox" size="1"', 'value', 'text', $value );
	}
}
Return current item: HikaShop