getCurrentLanguage(); $m_return = ''; $P = new Common_Page(); $goods_list_page = '/'.$lang.'/shop/'; $parentid = defined('catid') ? catid : 0; $prev_parentid = defined('prev_catid') ? prev_catid : 0; $cats = new Products_Categories(); $prods = new Products(); $Page = new Common_Page(); $Template = new Common_Template('Default', 0); $current_lang = $L->getCurrentLanguage(); $list = $cats->getList($parentid, 'active',$current_lang); //print_r($list); $latest = array(); if($parentid>0) $latest = $prods->getClearanceItems($parentid); $keywords = array(); foreach ($list as $item) $keywords[]=$item['cat_name']; $Template->keywords = ''; if(!empty($keywords) && !isset($Template->keywords)) $Template->keywords = htmlspecialchars(implode(',',$keywords)); if(!isset($Template->description) && isset($cat_item['id'])) $Template->description = htmlspecialchars($cat_item['cat_name']); if($Template->keywords) $Template->description.= ', '.$Template->keywords; if (!empty($list)) { $m_return .= '
'; if(isset($cat_item['title'])) $m_return .= '

'.$cat_item['cat_name'].'

'; if(count($latest)) { $l = $cats -> getPath($parentid, 'sef',$lang,'',$parentid); $l = implode('/',$l); $title = $L->Str('Clearance'); $pic = '/images/common/clearance_'.$lang.'.jpg'; $link = '/'; $m_return .= '

'.$title.'

'.$title.'

'; } foreach ($list as $item) { $pic = $item['image'] ? '/images/category/'.$item['image'] : 'nopic.jpg'; $title = $item['cat_name']; $l = $cats -> getPath($item['id'], 'sef',$lang,'',$parentid); //print_r($l); $l = implode('/',$l); $link = $goods_list_page.$l.'/'; $m_return .= '

'.$title.'

'.$title.'

'; } $m_return .= '
'; }