Location: PHPKode > projects > HikaShop > back/types/breadcrumb.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 hikashopBreadcrumbType{
	function display($map,$value,$type=''){
		$class = hikashop::get('class.category');
		$mainCategories = $class->getParents($value);

		$ids = array();
		foreach($mainCategories as $mainCategory){
			$ids[] = $mainCategory->category_id;
		}
		$where=array();
		if(!empty($type)){
			$where = array(' a.category_type IN ('.$class->database->Quote($type).',\'root\')');
		}
		$childs = $class->loadAllWithTrans($ids,false,$where,' ORDER BY a.category_name ASC');
		$mainHTML = array();
		foreach($mainCategories as $k => $mainCategory){
			$values = array();
			$current = 0;
			$values[]= '<option value="0" onclick="document.getElementById(\''.$map.'\').value='.$mainCategory->category_id.';document.adminForm.submit();">' . JText::_('HIKA_NONE') . '</option>';
			foreach($childs as $child){
				if($child->category_parent_id==$mainCategory->category_id){
					$values[]= '<option value="'. $child->category_id .'" '. (in_array($child->category_id,$ids)?'selected="selected" ':'') .'onclick="document.getElementById(\''.$map.'\').value='.$child->category_id.';document.adminForm.submit();">' . $child->translation . '</option>';
				}
			}
			if(count($values)==1) continue;
			$mainHTML[]= '<select name="'. $map .'_chooser_'.$k.'" id="'. $map .'_chooser_'.$k.'" class="inputbox" size="1">'."\n".implode("\n",$values)."\n".'</select>';	
		}
		return implode('',$mainHTML);
	}
}
Return current item: HikaShop