Вариант не особо быстрый но работает
/view/View.php
// Настраиваем плагины для смарти
$this->design->smarty->registerPlugin("function", "get_features", array($this, 'get_features_plugin'));
function get_features_plugin($params, &$smarty){
if(!empty($params['category'])){
$category = $this->categories->get_category($params['category']);
if(!$category) return $features;
// $params['category_id'] = $category->id;
}
$features = array();
foreach($this->features->get_features(array('category_id'=>$category->id, 'in_filter'=>1)) as $feature)
{
$features[$feature->id] = $feature;
if(($val = $this->request->get($feature->id))!=''){
if($val[0] != '')
$filter['features'][$feature->id] = $val;
}
}
$options_filter['visible'] = 1;
$features_ids = array_keys($features);
if(!empty($features_ids))
$options_filter['feature_id'] = $features_ids;
$options_filter['category_id'] = $category->children;
if(isset($filter['features']))
$options_filter['features'] = $filter['features'];
$options = $this->features->get_options($options_filter);
foreach($options as $option)
{
if(isset($features[$option->feature_id]))
$features[$option->feature_id]->options[] = $option;
}
foreach($features as $i=>&$feature)
{
if(empty($feature->options))
unset($features[$i]);
}
if(!empty($params['var']))
$smarty->assign($params['var'], $features);
}
Вывод в шаблоне
где 1- id директории из которой выводить характеристики
{get_features category=1 var="tmp"}
собственно вывод значений
{foreach $tmp as $key=>$f}
.......
{/foreach}