Как сделать фильтр по категориям в компоненте Архив! Вот нашел пример, но понять не могу объясните пожалуйста или исправьте если не сложно. Код (PHP): <?php defined('_VALID_MOS') or die('Restricted access'); global $mosConfig_offset, $mosConfig_live_site, $Itemid; //setup Itemid $query = "SELECT id" . "\n FROM #__menu" . "\n WHERE type = 'components'" . "\n AND link LIKE '%com_virtuemart%'"; $database->setQuery($query); $Itemid = $database->loadResult(); $catid = $_GET['category_id']; if ( $catid != '' ) { $query = "SELECT distinct a.manufacturer_id,a.mf_name FROM #__{vm}_manufacturer AS a "; if (!empty( $category_id ) ) { $query .= ", #__{vm}_product_category_xref AS d, " . " #__{vm}_product AS b, " . " #__{vm}_product_mf_xref AS c " . " WHERE d.category_id='$category_id'" . " AND d.product_id = b.product_id AND b.product_publish='Y' " . " AND b.product_id = c.product_id AND c.manufacturer_id = a.manufacturer_id "; } $query .= "ORDER BY mf_name ASC"; $db = new ps_DB; $db->query( $query ); $res = $db->record; ?> <select class="inputbox" name="manufacturer_id" onchange="order.submit()"> <option value="">Выбрать производителя</option> <?php foreach ($res as $manufacturer) { $selected = ''; if( @$_REQUEST['manufacturer_id'] == $manufacturer->manufacturer_id ) { $selected = 'selected="selected"'; } echo "<option value=\"".$manufacturer->manufacturer_id ."\" $selected>". $manufacturer->mf_name ."</option>\n"; } ?> </select> <?php } ?> Очень надо! Ото я со своим чайником уже не знаю у кого спросить!