Location: PHPKode > projects > HikaShop > back/types/item.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 hikashopItemType{
	function load(){
		$this->values = array();
		jimport('joomla.filesystem.folder');
		$product_folder = HIKASHOP_FRONT.'views'.DS.'product'.DS.'tmpl'.DS;
		$category_folder = HIKASHOP_FRONT.'views'.DS.'category'.DS.'tmpl'.DS;
		$files = JFolder::files($product_folder);
		$files = array_keys(array_merge(array_flip($files),array_flip(JFolder::files($category_folder))));
		foreach($files as $file){
			if(preg_match('#^listing_((?!div|list|price).*)\.php$#',$file,$match)){
				$val = strtoupper($match[1]);
				$trans = JText::_($val);
				if($trans==$val){
					$trans=$match[1];
				}
				$this->values[] = JHTML::_('select.option', $match[1], $trans);
			}
		}

	}
	function display($map,$value,&$js){
		$this->load();
		$options = 'class="inputbox" size="1"';
		return JHTML::_('select.genericlist',   $this->values, $map, $options, 'value', 'text', $value );
	}
}
Return current item: HikaShop