Вернуться   Дизайнерский форум » ВЕБ-ПРОГРАММИРОВАНИЕ » HTML, CSS, JavaScript

HostCMS и мои глупые вопросы

Обсуждение темы HostCMS и мои глупые вопросы в разделе HTML, CSS, JavaScript, часть категории ВЕБ-ПРОГРАММИРОВАНИЕ; Вроде принцип такой: есть XSL-шаблоны, там добовляем поля, и в "Типовых динамических страницах" привязываем значения полей....


Закрытая тема
 
Опции темы
Старый 16.03.2010, 10:43   #51
Вроде принцип такой: есть XSL-шаблоны, там добовляем поля, и в "Типовых динамических страницах" привязываем значения полей.
 
Старый 16.03.2010, 10:43
Ссылки
Старый 16.03.2010, 11:01   #52
Цитата:
Сообщение от Nimans Посмотреть сообщение
Вроде принцип такой: есть XSL-шаблоны, там добовляем поля, и в "Типовых динамических страницах" привязываем значения полей.
вот страница реализующая ИМ

Код:
<?phpfunction SetGroups($mas_groups, $set){	$mas_groups = to_array($mas_groups);	foreach ($mas_groups as $key=>$value)	{		foreach ($value as $key1=>$value1)		{			$set[] = $value1;			if ($value1 == $key)			{				$set[] = $key;				SetGroups($mas_groups, $set);			}		}	}	return $set;}$xsl_catalog = to_str($GLOBALS['LA']['xsl_catalog']);$xsl_item = to_str($GLOBALS['LA']['xsl_item']);$current_shop_id = to_int($GLOBALS['LA']['shop_id']);$param = array();$shop = & singleton('shop');if ($GLOBALS['shop_item_path'] != false){	$external_propertys = array();	if (class_exists("SiteUsers"))	{		/* Получаем id текущего пользователя сайта */		$SiteUsers = & singleton('SiteUsers');		$site_user_id = $SiteUsers->GetCurrentSiteUser();		$param['user_id'] = $site_user_id;		$external_propertys['user_id'] = $SiteUsers->GetCurrentSiteUser();	}	else	{		$site_user_id = 0;		$external_propertys['user_id'] = 0;	}	// Если добавление комментария	if (isset($_POST['submit_comment']) && !empty($GLOBALS['shop_item_path']['item']))	{		/* Проверяем CAPCHA*/		$Captcha = new Captcha();		$xmlData = '<?xml version="1.0" encoding="' . SITE_CODING . '"?>' . "\n";		$xmlData .= '<document>' . "\n";		if ($site_user_id > 0		|| $Captcha->ValidCaptcha(to_str($_POST['captcha_key']), to_str($_POST['captcha_keystring'])))		{			$param['shop_items_catalog_item_id'] = $GLOBALS['shop_item_path']['item'];			$param['shop_comment_user_name'] = to_str($_REQUEST['shop_comment_user_name']);			$param['shop_comment_user_email'] = to_str($_REQUEST['shop_comment_user_email']);			$param['shop_comment_subject'] = to_str($_REQUEST['shop_comment_subject']);			$param['shop_comment_text'] = to_str($_REQUEST['shop_comment_text']);			$param['shop_comment_grade'] = to_int($_REQUEST['shop_comment_grade']);			$param['shop_comment_date_time'] = date("Y-m-d H:i:s");			/* Активность/неактивность комментария */			$shop_row = $shop->GetShop($current_shop_id);			if ($shop_row)			{				$param['shop_comment_active'] = to_int($shop_row['shop_comment_active']);			}			else			{				$param['shop_comment_active'] = false;			}			$external_propertys['comment_is_active'] = $param['shop_comment_active'];			// Если есть модуль "Пользователи сайта", получим текущего пользователя			if (class_exists('SiteUsers'))			{				$SiteUsers = & singleton('SiteUsers');				$param['site_users_id'] = $SiteUsers->GetCurrentSiteUser();			}			else			{				$param['site_users_id'] = 0;			}			$shop_comment_id = $shop->InsertComment($param);			// Задан XSL для формирования письма администратору о добавлении комментария к товару			if (to_str($GLOBALS['LA']['xsl_add_comment_letter_to_admin']) != '')			{				// Формируем XML для комментария				$xmlData .= $shop->GenXml4Comment($shop_comment_id);				$xmlData .= '</document>' . "\n";				$xsl = new xsl();				// Формируем текст письма администратору				$message = $xsl->build($xmlData, $GLOBALS['LA']['xsl_add_comment_letter_to_admin']);				// Формат письма - текст				if (to_int($GLOBALS['LA']['comment_mail_type']) == 0)				{					$comment_mail_type = 'text/plain';				}				else				{					$comment_mail_type = 'text/html';				}				$subject = $GLOBALS['MSG_shops']['subject_report_for_comment'];				$kernel = & singleton('kernel');				// Получаем e-mail куратора магазина				$email_to = to_str($shop_row['shop_shops_admin_mail']);				if (!empty($email_to))				{					$kernel->SendMailWithFile($email_to, EMAIL_TO, $subject, $message, array(), $comment_mail_type);				}			}		}		else		{			/* Неправильно введен код изображенный на картинке */			$external_propertys['error'] = 1;			/* Запоминаем значения */			$external_propertys['shop_comment_user_name'] = strip_tags(to_str($_REQUEST['shop_comment_user_name']));			$external_propertys['shop_comment_user_email'] = strip_tags(to_str($_REQUEST['shop_comment_user_email']));			$external_propertys['shop_comment_subject'] = strip_tags(to_str($_REQUEST['shop_comment_subject']));			$external_propertys['shop_comment_text'] = strip_tags(to_str($_REQUEST['shop_comment_text']));			$external_propertys['shop_comment_grade'] = to_int($_REQUEST['shop_comment_grade']);			$external_propertys['shop_comment_date_time'] = date("Y-m-d H:i:s");		}	}	/* Вывод списка */	if (!$GLOBALS['shop_item_path']['item'])	{		$param['current_group_id'] = $GLOBALS['shop_item_path']['group']; // корневая группа		/* Определяем номер элемента, с которого начинается показ в текущей группе */		$page = end($GLOBALS['URL_ARRAY']);		$page = to_str($page);		$shop_row = $shop->GetShop($current_shop_id);		if ($shop_row)		{			$items_on_page = $shop_row['shop_items_on_page'];		}		else		{			$items_on_page = 10;		}		/*		 Порядок сортировки ('Asc' - по возрастанию, 'Desc' - по убыванию, 'Rand' - произвольный порядок)		 $param['items_order']='Asc';		 Поле, по которому сортируем (наименование элемента)		 $param['items_field_order']='shop_items_catalog_name';		 */		/* Ограничиваем по производителю */		if (to_int($_GET['producer_id']) > 0)		{			$element['type'] = 0; // 0 - основное св-во, 1 - дополнительное			$element['name'] = 'shop_producers_list_id';			$element['prefix'] = 'AND'; // префикс			$element['if'] = '='; // Условие			$element['value'] = to_int($_GET['producer_id']);			$element['sufix'] = '';			$param['select'][] = $element;			$external_propertys['producer_id'] = to_int($_GET['producer_id']);			/* Применять фильтр */			$external_propertys['apply_filter'] = true;		}		/* Ограничиваем по продавцу */		if (to_int($_GET['saller_id']) > 0)		{			$element['type'] = 0; // 0 - основное св-во, 1 - дополнительное			$element['name'] = 'shop_sallers_id';			$element['prefix'] = 'AND'; // префикс			$element['if'] = '='; // Условие			$element['value'] = to_int($_GET['saller_id']);			$element['sufix'] = '';			$param['select'][] = $element;			$external_propertys['saller_id'] = to_int($_GET['saller_id']);			/* Применять фильтр */			$external_propertys['apply_filter'] = true;		}		$price_from = str_replace(',', '.', to_float($_GET['price_from']));		/* Ограничиваем по цене ОТ */		if ($price_from > 0)		{			$external_propertys['price_from'] = $price_from;			/* Применять фильтр */			$external_propertys['apply_filter'] = true;		}		$price_to = str_replace(',', '.', to_float($_GET['price_to']));		/* Ограничиваем по цене ДО */		if ($price_to > 0)		{			$external_propertys['price_to'] = $price_to;			/* Применять фильтр */			$external_propertys['apply_filter'] = true;		}		/* Число элементов на странице */		$on_page = to_int($_GET['on_page']);		if ($on_page > 0 && $on_page < 150)		{			$param['items_on_page'] = $on_page;			$external_propertys['on_page'] = $on_page;			/* Применять фильтр */			$external_propertys['apply_filter'] = true;		}		// Определяем номер страницы.		if ($on_page)		{			$items_on_page = $on_page;		}		if (ereg("^page-([0-9]*)$", $page, $regs) && to_int($regs[1]) > 1)		{			/* Страница умножается на кол-во элементов, выводимых на страницу */			$items_begin = ($regs[1] - 1) * $items_on_page;		}		else		{			$items_begin = 0;		}		$param['items_begin'] = $items_begin;		/* Направление сортировки, 0 - по-возрастанию, 1 - по-убыванию */		$order_direction = to_int($_GET['order_direction']);		switch ($order_direction)		{			case 1: /* По-возрастанию */				{					$order_direction = 'ASC';					break;				}			case 2: /* По-убыванию */				{					$order_direction = 'DESC';					break;				}			default: /* по умолчанию */				{					$order_direction = 'ASC';					break;				}		}		/* Поле сортировки */		$sort_field = to_int($_GET['sort_by_field']);		switch ($sort_field)		{			case 1: /* По имени */				{					$param['items_field_order'] = 'shop_items_catalog_name';					$param['items_order'] = $order_direction;					$external_propertys['sort_by_field'] = $sort_field;					$external_propertys['order_direction'] = $order_direction;					break;				}			case 2: /* По цене */				{					//$param['items_field_order'] = 'shop_items_catalog_price';					$param['items_field_order'] = 'item_price_absolute';					$param['items_order'] = $order_direction;					$external_propertys['sort_by_field'] = $sort_field;					$external_propertys['order_direction'] = $order_direction;					break;				}			case 3:  /* По оценке*/				{					$param['items_field_order'] = 'shop_comment_grade';					$param['items_order'] = $order_direction;					$external_propertys['sort_by_field'] = $sort_field;					$external_propertys['order_direction'] = $order_direction;					break;				}		}		// Задан фильтр и/или сортировка по цене		if ($price_from > 0 || $price_to > 0 || $sort_field == 2)		{			// Получаем список валют магазина			$currency_result = $shop->GetAllCurrency();			$query_currency_switch = 'shop_items_catalog_price';			// Цикл по валютам магазина			while ($currency_row = mysql_fetch_assoc($currency_result))			{				// Получаем коэффициент пересчета для каждой валюты				$currency_coefficient = $shop->GetCurrencyCoefficientToShopCurrency($currency_row['shop_currency_id'], $shop_row['shop_currency_id']);				$query_currency_switch = "IF (shop_items_catalog_table.shop_currency_id = {$currency_row['shop_currency_id']}, shop_items_catalog_table.shop_items_catalog_price * $currency_coefficient, $query_currency_switch)";			}			$param['sql_external_select'] = ' ,' . $query_currency_switch . ' AS item_price_absolute';		}		/* Обработка дополнительных свойств.		 Получаем список свойств, разрешенных для отображения в данной группе и в фильтре */		$resource_properties = $shop->GetPropertiesOfGroupForXml($current_shop_id, $param['current_group_id']);		if ($resource_properties)		{			$element['type'] = 0; /* 0 - основное св-во, 1 - дополнительное */			/* Префикс, если нужен. */			$element['prefix'] = ' AND ('; // префикс			/* ОСТАВЛЯЕТЕ БЕЗ ИЗМЕНЕНИЙ, ЭТО НУЖНО ДЛЯ СОРТИРОВКИ */			$element['name'] = ''; // Имя			/* поля для основного св-ва, если тип = 1, то не указывается */			$element['if'] = ''; // Условие			/* Вот здесь передается ID доп. св-ва, по которому производится сортировка.			 ID ВАШЕГО ПОЛЯ УКАЗЫВАЕТЕ ЗДЕСЬ */			$element['value'] = ''; /* Значение поля (или параметра) */			$element['sufix']=' ';			/* Добавляем в общий список условий */			$param['select'][] = $element;			$count_condition = 0;			$property_xml = '';			$count_properties = mysql_num_rows($resource_properties);							// Массив идентификаторов доп. свойств, для которых задан тип отображения "Список - флажками"			$mas_key_list_checkbox = array();							for ($i = 0; $i < $count_properties; $i++)			{				$row = mysql_fetch_assoc($resource_properties);				$element['value'] = 0;				switch ($row['shop_list_of_properties_show_kind'])				{					case 1: // Поле ввода					case 2: // Список - списком					case 3:	// Список - переключателями					case 5:	// Флажок						{							/* Выбираем режим отображения */							$get_param = 'property_id_' . $row['shop_list_of_properties_id'];							if (isset($_GET[$get_param]))							{								if ($row['shop_list_of_properties_type'] == 0								|| $row['shop_list_of_properties_show_kind'] == 1)								{									if (to_str($_GET[$get_param]) !== '')									{										$element['value'] = quote_smart(to_str($_GET[$get_param]));										$external_propertys['property_id_' . to_int($row['shop_list_of_properties_id'])] = $element['value'];										$property_xml .= '&property_id_' . to_int($row['shop_list_of_properties_id']) . '=' . $element['value'];										//$element['value'] = '%' . $element['value'] . '%';									}								}								// Флажок								elseif($row['shop_list_of_properties_type'] == 7)								{									$element['value'] = 1;									$external_propertys['property_id_' . to_int($row['shop_list_of_properties_id'])] = $element['value'];									$property_xml .= '&property_id_' . to_int($row['shop_list_of_properties_id']) . '=' . $element['value'];								}								else								{									if (to_int($_GET[$get_param]) > 0)									{										$element['value'] = to_int($_GET[$get_param]);										$external_propertys['property_id_'.to_int($row['shop_list_of_properties_id'])] = $element['value'];										$property_xml .= '&property_id_'.to_int($row['shop_list_of_properties_id']).'='.$element['value'];									}								}							}							if ($element['value'])							{								/* Применять фильтр */								$external_propertys['apply_filter'] = true;								$element['property_id'] = to_int($row['shop_list_of_properties_id']);								$element['type'] = 1; /* 0 - основное св-во, 1 - дополнительное */								//$element['prefix'] = ''; /* префикс */								// Способ отображения "Поле ввода"								if ($row['shop_list_of_properties_show_kind'] == 1 && !is_numeric($_GET[$get_param]))								{									$element['value'] = '%' . $element['value'] . '%';									$element['if'] = ' LIKE '; /* Условие */								}								else								{									$element['if'] = '='; /* Условие */								}								$element['sufix'] = '';								if ($count_condition)								{									$element['prefix'] = ' OR '; /* префикс */								}								else								{									$element['prefix'] = ' '; /* префикс */								}								$count_condition++;								$param['select'][] = $element;							}						}					case 4: // Тип отображения - список флажками						{							// Модуль "Списки" подключен и  значенич доп. свойства не обработаны ранее							if (class_exists('lists') && !in_array($row['lists_id'], $mas_key_list_checkbox))							{								$mas_key_list_checkbox[] = $row['lists_id'];																	$lists = & singleton('lists');								// Получаем информацию о элементах списка, который задан для доп. свойства								$list_items_resource = $lists->SelectListsItems($row['lists_id']);								$k = 0;								// Цикл по элементам списка								while($row_list_item = mysql_fetch_assoc($list_items_resource))								{									// Передано значение элемента списка. Формируем запрос.									if (isset($_GET['property_id_' . $row['shop_list_of_properties_id'] .'_item_id_' . $row_list_item['lists_items_id']]))									{										if ($count_condition || $k > 0)										{											$element['prefix'] = ' OR '; /* префикс */										}										else										{											$element['prefix'] = ' ';										}																					$element['property_id'] = to_int($row['shop_list_of_properties_id']);																					$element['type'] = 1; /* 0 - основное св-во, 1 - дополнительное */										$element['if'] = '='; /* Условие */										$element['value'] = $row_list_item['lists_items_id'];										$element['sufix'] = '';										$param['select'][] = $element;										$external_propertys['property_id_' . to_int($row['shop_list_of_properties_id']) . '_item_id_' . $row_list_item['lists_items_id']] = $element['value'];										$property_xml .= '&property_id_' . to_int($row['shop_list_of_properties_id']) . '_item_id_' . $row_list_item['lists_items_id'] . '=' . $element['value'];										$k++;									}								}								// Задан фильтр по одному из значений списка								if ($k > 0)								{									$count_condition++;								}							}							break;						}					case 6: // Тип отображения - диапазон						{							$get_param_from = 'property_id_' . $row['shop_list_of_properties_id'] . '_from';							$get_param_to = 'property_id_' . $row['shop_list_of_properties_id'] . '_to';							if (isset($_GET[$get_param_from]) && strlen($_GET[$get_param_from]) > 0)							{																$value = floatval($_GET[$get_param_from]);								/* Применять фильтр */								$external_propertys['apply_filter'] = true;								$external_propertys['property_id_'.to_int($row['shop_list_of_properties_id']) . '_from'] = $value;								$property_xml .= '&property_id_' . to_int($row['shop_list_of_properties_id']).'_from=' . $value;								$element['type'] = 1; /* 0 - основное св-во, 1 - дополнительное */								$element['property_id'] = to_int($row['shop_list_of_properties_id']);								$element['if'] = 'IS NOT NULL'; /* Условие */								$element['value'] = '';								$property_row = $shop->GetPropretyOfItems($element['property_id']);								if($property_row['shop_list_of_properties_type'] == 2)								{									$lists_id = to_int($property_row['lists_id']);									$lists = & singleton('lists');									$list_row = $lists->GetListItemsById($lists_id);									$in = array();									if (is_array($list_row) && count($list_row) > 0)									{										foreach ($list_row as $row_lists_items_value)										{											if ($row_lists_items_value['lists_items_value'] >= $value)											{												$in[] = $row_lists_items_value['lists_items_id'];											}										}									}									if(count($in) > 0)									{										$element['sufix'] = 'AND shop_properties_items_table.shop_properties_items_value - 0.0 IN ('.implode(',', $in).') ';									}									else									{										$element['sufix'] = "";									}								}								else								{									$element['sufix'] = " AND shop_properties_items_table.shop_properties_items_value - 0.0 >=$value";								}								if ($count_condition)								{									$element['prefix'] = ' OR '; /* префикс */								}								else								{									$element['prefix'] = ' '; /* префикс */								}								$param['select'][] = $element;								$count_condition++;							}							if (isset($_GET[$get_param_to]) && strlen($_GET[$get_param_to]) > 0)							{								$value = floatval($_GET[$get_param_to]);								/* Применять фильтр */								$external_propertys['apply_filter'] = true;								$external_propertys['property_id_'.to_int($row['shop_list_of_properties_id']) . '_to'] = $value;								$property_xml .= '&property_id_'.to_int($row['shop_list_of_properties_id']).'_to='.$value;								$element['property_id'] = to_int($row['shop_list_of_properties_id']);								$element['type'] = 1; /* 0 - основное св-во, 1 - дополнительное */								$element['if'] = 'IS NOT NULL'; /* Условие */								$element['value'] = '';								$property_row = $shop->GetPropretyOfItems($element['property_id']);								if ($property_row['shop_list_of_properties_type'] == 2)								{									$lists_id = to_int($property_row['lists_id']);									$lists = & singleton('lists');									$list_row = $lists->GetListItemsById($lists_id);									$in = array();									if (is_array($list_row) && count($list_row) > 0)									{										foreach ($list_row as $row_lists_items_value)										{											if($row_lists_items_value['lists_items_value'] <= $value)											{												$in[] = $row_lists_items_value['lists_items_id'];											}										}									}																		if(count($in) > 0)									{										$element['sufix'] = 'AND shop_properties_items_table.shop_properties_items_value - 0.0 IN ('.implode(',', $in).') ';									}									else									{										$element['sufix'] = "";									}								}								else								{									$element['sufix'] = "AND shop_properties_items_table.shop_properties_items_value - 0.0 <= $value";								}								if (!(isset($_GET[$get_param_from]) && strlen($_GET[$get_param_from]) > 0))								{									if ($count_condition)									{										$element['prefix'] = ' OR '; /* префикс */									}									else									{										$element['prefix'] = ' '; /* префикс */									}									$count_condition++;								}								else								{									$element['prefix'] = ' AND ';								}								$param['select'][] = $element;							}							break;						}					case 7: // Список - список с множественным выбором						{														// Модуль "Списки" подключен и передан массив значений доп. свойства							if (class_exists('lists') && isset($_GET['property_id_' . $row['shop_list_of_properties_id']]) && is_array($_GET['property_id_' . $row['shop_list_of_properties_id']]))							{																									$lists = & singleton('lists');								// Получаем информацию о элементах списка, который задан для доп. свойства								$list_items_resource = $lists->SelectListsItems($row['lists_id']);								$k = 0;																// Цикл по элементам списка								while($row_list_item = mysql_fetch_assoc($list_items_resource))								{									// Передано значение элемента списка. Формируем запрос.									if (in_array($row_list_item['lists_items_id'], $_GET['property_id_' . $row['shop_list_of_properties_id']]))									{										if ($count_condition || $k > 0)										{											$element['prefix'] = ' OR '; /* префикс */										}										else										{											$element['prefix'] = ' ';										}																					$element['property_id'] = to_int($row['shop_list_of_properties_id']);																					$element['type'] = 1; /* 0 - основное св-во, 1 - дополнительное */										$element['if'] = '='; /* Условие */										$element['value'] = $row_list_item['lists_items_id'];										$element['sufix'] = '';										$param['select'][] = $element;										$external_propertys['property_id_' . to_int($row['shop_list_of_properties_id']) . '_item_id_' . $row_list_item['lists_items_id']] = $element['value'];										$property_xml .= '&property_id_' . to_int($row['shop_list_of_properties_id']) . '_item_id_' . $row_list_item['lists_items_id'] . '=' . $element['value'];										$k++;									}								}								// Задан фильтр по одному из значений списка								if ($k > 0)								{									$count_condition++;								}							}														break;						}				}			}			if (!$count_condition)			{				$element['prefix'] = ' 1'; /* префикс */			}			else			{				$element['prefix'] = ''; // префикс			}			/* добавляем конечный элемент, содержащий HAVING */			$element['type'] = 0; /* 0 - основное св-во, 1 - дополнительное */			/* ОСТАВЛЯЕТЕ БЕЗ ИЗМЕНЕНИЙ, ЭТО НУЖНО ДЛЯ СОРТИРОВКИ */			$element['name'] = ''; /* Имя */			/* поля для основного св-ва, если тип = 1, то не указывается */			$element['if'] = ''; /* Условие */			/* Вот здесь передается ID доп. св-ва, по которому производится сортировка.			 ID ВАШЕГО ПОЛЯ УКАЗЫВАЕТЕ ЗДЕСЬ */			$element['value'] = ''; // Значение поля (или параметра)			//if ($count_condition != 0 && ($price_from > 0 || $price_to >0))			if ($count_condition != 0)			{				$param['sql_group_by'] = 'GROUP BY shop_items_catalog_table.shop_items_catalog_item_id';									$param['sql_having'] = "HAVING COUNT(shop_properties_items_table.shop_properties_items_id) = {$count_condition}";			}			else			{				$param['sql_having'] = 'HAVING 1 ';			}			$element['sufix'] = ' ) ';			/* Добавляем в общий список условий */			$param['select'][] = $element;		}		else		{			$param['sql_having'] = 'HAVING 1 ';		}		if ($price_from > 0)		{			$param['sql_having'] .= ' AND item_price_absolute >= ' . $price_from;		}		if ($price_to > 0)		{			$param['sql_having'] .= ' AND item_price_absolute <= ' . $price_to;		}					/* добавляем конечный элемент, содержащий HAVING */		$element['type'] = 0; /* 0 - основное св-во, 1 - дополнительное */		$element['prefix'] = ' AND';		$element['name'] = 'shop_items_catalog_table.shop_shops_id'; /* Имя */		$element['if'] = '='; /* Условие */		$element['value'] = $current_shop_id; // Значение поля (или параметра)		$element['sufix'] = '';		/* Добавляем в общий список условий */		$param['select'][] = $element;		if (!empty($property_xml))		{			$external_propertys['property_xml'] = $property_xml;		}		// Если передано имя тэга - фильтруем		if (isset($GLOBALS['shop_item_path']['tag_name']))		{			if (class_exists('Tag'))			{				$oTag = & singleton('Tag');				$tag_row = $oTag->GetTagByPath($GLOBALS['shop_item_path']['tag_name']);				$param['tags'] = array($tag_row['tag_id']);				// При выводе тэгов вывод элементов ведется из всех групп				$param['current_group_id'] = false;			}		}		// При выводе списка товаров получать подробное описание каждого товара не нужно		$param['show_text'] = false;		// При выводе списка товаров получать сопутствующие товары не нужно		$param['xml_show_tying_products'] = false;		// Разрешаем передачу в XML свойств групп		$param['xml_show_group_property'] = true;		$shop->ShowShop($current_shop_id, $xsl_catalog, $param, $external_propertys);	}	else	{		/* Вывод конкретного элемент */		//$param['show_catalog_item_type'] = array('active', 'inactive');		/* Вывод конкретного элемент */		$shop->ShowItem($GLOBALS['shop_item_path']['item'], $xsl_item, $param, $external_propertys);	}}?>
Добавлено через 5 минут

вот настройка к этой странице

Код:
<?php/* Создаем экземпляр класса магазина (при создании устанавливаем флаг необходимости очистки cookie) */$shop = new shop(true);$kernel = & singleton('kernel');$current_shop_id = to_int($GLOBALS['LA']['shop_id']);// Обработка скачивания файла электронного товараif (isset($_GET['download_file'])){	$eitem_path = to_str($_GET['download_file']);	// Получаем заказанный товар с данным путем	if ($order_item_row = $shop->GetOrderItemByPath($eitem_path))	{		// Получаем информацию о заказе		$order_row = $shop->GetOrder($order_item_row['shop_order_id']);		if ($order_row)		{			$DateClass = new DateClass();			// Проверяем, доступна ли ссылка (Ссылка доступна в течение суток после оплаты)			if ($DateClass->DateSqlToUnix($order_row['shop_order_date_of_pay']) > time() - 24 * 60 * 60)			{				// Получаем информацию об электронной сущности заказанного товара				$eitem_row = $shop->GetEitem($order_item_row['shop_eitem_id']);				if ($eitem_row['shop_eitem_filename'] != '')				{					if (class_exists('File'))					{						$File = new File();													$ext = $kernel->GetExtension($eitem_row['shop_eitem_filename']);						$file_path = CMS_FOLDER . UPLOADDIR . "shop_{$current_shop_id}/eitems/item_catalog_{$eitem_row['shop_items_catalog_item_id']}/{$eitem_row['shop_eitem_id']}.{$ext}";						if (is_file($file_path))						{							$File->Download($file_path, $eitem_row['shop_eitem_filename'], array('content_disposition' => 'attachment'));						}						unset($File);					}				}			}		}	}}if(preg_match("^user-(.*)^", end($GLOBALS['URL_ARRAY']), $regs)){	// Установка кукис для аффилиат-программы	setcookie('affiliate_name', $regs[1], time() + 31536000, '/');	$break_if_path_not_found = false;}else{	$break_if_path_not_found = true;}// получаем для пути ассоциативный массив с id группы и id/url элемента$GLOBALS['shop_item_path'] = $shop->GetItemPath($current_shop_id, '', $break_if_path_not_found);/* Если путь существует */if ($GLOBALS['shop_item_path']){	$group_path = '';	// получаем массив с деревом от текущей группы до корня	$mas_groups_to_root = $shop->GetShopGroupsToRoot($GLOBALS['shop_item_path']['group'], $current_shop_id);	// получаем данные о группе	$row_group = $shop->GetGroup($GLOBALS['shop_item_path']['group']);	// получаем данные из seo - полей для групп	$seo_title = trim($row_group['shop_groups_seo_title']);	$seo_description = trim($row_group['shop_groups_seo_description']);	$seo_keywords = trim($row_group['shop_groups_seo_keywords']);	// цикл по массиву с деревом для формирования пути по группам	$count_groups=count($mas_groups_to_root);	for ($i = $count_groups - 1; $i >= 0; $i--)	{		if ($i < $count_groups-1)		{			$group_path .= ' — ';		}		if (trim($mas_groups_to_root[$i]['shop_groups_seo_title'])=='')		{			$group_path .= $mas_groups_to_root[$i]['shop_groups_name'];		}		else		{			$group_path .= $mas_groups_to_root[$i]['shop_groups_seo_title'];		}	}	$item_name='';	// Если вывод информационного элемента	if ($GLOBALS['shop_item_path']['item'])	{		// получаем данные о товаре		$row_item = $shop->GetItem($GLOBALS['shop_item_path']['item']);		// имя элемента		$item_name = $row_item['shop_items_catalog_name'];		// проверяем если seo_title непустой, то в заголовок страницы подставляем его		if (trim($row_item['shop_items_catalog_seo_title'])!='')		{			$item_name = trim($row_item['shop_items_catalog_seo_title']);		}		if ($group_path != '')		{			$item_name = ' — '. $item_name;		}	}	if (isset($GLOBALS['shop_item_path']['tag_name']) && class_exists('Tag'))	{		$oTag = new Tag();		$tag_row = $oTag->GetTagByPath($GLOBALS['shop_item_path']['tag_name']);				if ($tag_row)		{			$tag_name = "Метка: {$tag_row['tag_name']}. ";		}	}		// формируем заголовок страницы	$new_title = to_str($tag_name) . $group_path . $item_name;}else{	// Элемент/группа не найдены, возвращаем 404 ошибку.	ShowHeader404();	// Запрещаем отдавать 200-й заголовок	if (!defined('IS_ERROR_404'))	{		define('IS_ERROR_404', true);	}		$site = & singleton('site');	$site_row = $site->GetSite(CURRENT_SITE);	if ($site_row['site_error404'])	{		$structure = & singleton('Structure');		$structure_id = intval($site_row['site_error404']);		$structure_row = $structure->GetStructureItem($structure_id);		// Если тип - страница		if ($structure_row['structure_type'] == 0)		{			$document = & singleton('documents');			$documents_version_row = $document->GetCurrentDocumentVersion($structure_row['documents_id']);			$documents_version_id = $documents_version_row['documents_version_id'];			// Текущая страница			$kernel->set_current_page(PAGE_DIR . 'documents' . $documents_version_id . '.html');		}		elseif ($structure_row['structure_type'] == 1)		{			// Текущая страница - модуль			$kernel->set_current_page(CMS_FOLDER . 'structure/Modules/Module' . $structure_id . '.php');		}		else		{			/* типовая динамическая страница */			$lib_id = intval($structure_row['lib_id']);			/* Получаем параметры типовой динамической страницы */			$lib = new lib();			$GLOBALS['LA'] = $lib->LoadLibPropertiesValue($lib_id, $structure_id);			$kernel->set_current_page(CMS_FOLDER . "lib/lib_$lib_id/lib_$lib_id.php");		}		// Шаблон вывода для страницы		$kernel->set_current_page_data_template($structure_row['data_templates_id']);	}	elseif (to_str($_SERVER['REQUEST_URI']) != '/')	{		header('Location: /');		// Прекращаем выполнение		exit();	}}if (!empty($new_title)){	// отображаем группу	if (!isset($row_item))	{		// Заголовок для группы задан		if (!empty($seo_title))		{			$kernel->set_title($seo_title);		}		else // Описание для группы не задано		{			$kernel->set_title($new_title);		}		// Описание для группы задано		if (!empty($seo_description))		{			$kernel->set_description($seo_description);		}		else // Описание для группы не задано		{			$kernel->set_description($new_title);		}		// Ключевые слова для группы заданы		if (!empty($seo_keywords))		{			$kernel->set_keywords($seo_keywords);		}		else // Ключевые слова для группы не заданы		{			$kernel->set_keywords($new_title);		}	}	else // отображаем элемент	{		// Описание для элемента задано		if (!empty($row_item['shop_items_catalog_seo_title']))		{			$kernel->set_title(trim($row_item['shop_items_catalog_seo_title']));		}		else  // Описание для элемента не задано		{			$kernel->set_title($new_title);		}		// Описание для элемента задано		if (!empty($row_item['shop_items_catalog_seo_description']))		{			$kernel->set_description(trim($row_item['shop_items_catalog_seo_description']));		}		else  // Описание для элемента не задано		{			$kernel->set_description($new_title);		}		// Ключевые слова для элемента заданы		if (!empty($row_item['shop_items_catalog_seo_keywords']))		{			$kernel->set_keywords(trim($row_item['shop_items_catalog_seo_keywords']));		}		else // Ключевые слова для элемента не заданы		{			$kernel->set_keywords($new_title);		}	}}/* Обработка сравнения товаров *//* Десериализуем массив */if (isset($_COOKIE['SHOPCOMPARE'])){	$compare_items = @unserialize($shop->GetCookie('SHOPCOMPARE'));	$compare_items = to_array($compare_items);}else{	$compare_items = array();}/* Добавление элементов */foreach ($_GET as $key => $value){	/* Выбираем из запроса товары, которые нужно добавить в список для сравнения */	if (preg_match("/compare_id_(\d*)/", $key, $matches))	{		$compare_id = to_int($matches[1]);		/* Проверяем, есть ли этот товар в кукисах для сравнения */		if (!in_array($compare_id, $compare_items))		{			/*Добавляем в массив кукисов*/			$compare_items[] = $compare_id;		}	}}/* Удаление выбранного товара из сравнения */if (isset($_GET['delete_compare'])){	foreach ($_GET as $key => $value)	{		/* Извлекаем индекс товара, который нужно удалить из сравнения и кукиса */		if (preg_match("/del_compare_id_(\d*)/", $key, $matches))		{			$compare_id = to_int($matches[1]);			$i = array_search($compare_id, $compare_items);			if ($i !== false)			{				unset($compare_items[$i]);			}		}	}}/* Удаление всех сравнений */if (isset($_GET['delete_all_compare'])){	$compare_items = array();}/* Устанавливаем кукисы */if (count($compare_items) > 0){	$shop->SetCookie("SHOPCOMPARE", serialize($compare_items), time() + 31536000, '/');}else{	$shop->SetCookie("SHOPCOMPARE", '', 0, '/');	unset($_COOKIE['SHOPCOMPARE']);}?>
Добавлено через 1 минуту

вот XSL Магазин Товар

Код:
<?xml version="1.0" encoding="windows-1251"?><!DOCTYPE xsl:stylesheet><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">	<xsl:output xmlns="http://www.w3.org/TR/xhtml1/strict" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" encoding="Windows-1251" indent="yes" method="html" omit-xml-declaration="no" version="1.0" media-type="text/xml"/>		<!-- МагазинТовар -->		<xsl:decimal-format name="my" decimal-separator="," grouping-separator=" "/>		<xsl:template match="/shop">		<xsl:apply-templates select="item"/>	</xsl:template>		<xsl:template match="item">				<SCRIPT>			<xsl:comment>				<xsl:text disable-output-escaping="yes">					<![CDATA[										// массив для хранения текущих рейтингов звезд					var curr_rate = new Array();										// функция работы со звездами рейтинга					function set_rate(id, new_rate)					{					// устанавливаем атрибуты					curr_star = document.getElementById(id);					parent_id = parseInt(curr_star.parentNode.id);										// при первом пересчете ставим рейтинг для группы звезд в 0					if (!curr_rate[parent_id])					{					curr_rate[parent_id] = 0;					}										// устанавливаем новый рейтинг в массив рейтингов и значение скрытого поля					if (new_rate != curr_rate[parent_id] && parseInt(new_rate) > 0)					{					curr_rate[parent_id] = new_rate;										curr_form = document.getElementById('comment_form_0' + (parent_id != 0 ? parent_id : ''));					curr_form.shop_comment_grade.value = curr_rate[parent_id].charAt(curr_rate[parent_id].length - 1);					}										// пересчет стилей для звезд					for (i = 1; i < 6; i++)						{						if (parent_id != 0)						{						j = parent_id + '' + i + '_star_' + i;						}						else						{						j = i + '_star_' + i;						}												temp_obj = document.getElementById(j);												if (new_rate == 0)						{						id = curr_rate[parent_id];						}												if (parseInt(j) > parseInt(id))						{						temp_obj.className = '';						}						else						{						temp_obj.className = 'curr';						}						}						}												function set_count_mod(input_id, step)						{						var oCountMod = document.getElementById(input_id);												if (!(iCurrCount = parseInt(oCountMod.value))) {						iCurrCount = 0;						}												if (!(iCurrCount <= 0 && step < 0)) {								oCountMod.value = iCurrCount + step;								}								}								]]>							</xsl:text>						</xsl:comment>					</SCRIPT>										<h1>						<xsl:value-of disable-output-escaping="yes" select="name"/>					</h1>										<!-- Получаем ID родительской группы и записываем в переменную $parent_group_id -->					<xsl:variable name="parent_group_id" select="/shop/@current_group_id"/>										<xsl:if test="$parent_group_id = 0">						<a href="{/shop/path}">							<xsl:value-of disable-output-escaping="yes" select="/shop/name"/>						</a>					</xsl:if>										<!-- Путь к группе -->					<xsl:apply-templates select="//group[@id=$parent_group_id]" mode="goup_path"/>										<!-- Если модификация, выводим в пути родительский товар -->					<xsl:if test="/shop/parent_item/node()">						<span class="path_arrow">&#x2192;</span>						<a href="{/shop/path}{/shop/parent_item/item/fullpath}{/shop/parent_item/item/path}/">							<xsl:value-of disable-output-escaping="yes" select="/shop/parent_item/item/name"/>						</a>					</xsl:if>										<span class="path_arrow">&#x2192;</span>					<b>						<a href="{/path}">							<xsl:value-of disable-output-escaping="yes" select="name"/>						</a>					</b>										<div style="float: left; margin: 20px 0px 0px 20px">						<!-- Средняя оценка товара -->						<xsl:if test="comments/average_grade/node()">							<xsl:call-template name="show_average_grade">								<xsl:with-param name="grade" select="comments/average_grade"/>								<xsl:with-param name="const_grade" select="5"/>							</xsl:call-template>						</xsl:if>					</div>										<div style="clear: both"></div>										<!-- Информация об ошибках -->					<xsl:variable name="error_code" select="/shop/error"/>										<xsl:if test="$error_code != 0">						<div id="error">						<b>Внимание!</b>Неправильно введен код подтвержения!</div>					</xsl:if>										<xsl:if test="not(/shop/error/node()) and /shop/comment_is_active/node()">						<!-- Информация о выполненном действии -->						<div style="border: 1px solid #dadada; padding: 10px; width: 400px">							<b>								<xsl:choose>									<xsl:when test="/shop/comment_is_active = '0'">Комментарий успешно добавлен и будет опубликован после проверки модератором!</xsl:when>									<xsl:otherwise>Комментарий успешно добавлен и опубликован!</xsl:otherwise>								</xsl:choose>							</b>						</div>					</xsl:if>										<div>						<!-- Изображение для товара, если есть -->						<xsl:if test="small_image != ''">							<div style="float: left; width: {small_image/@width}px; margin: 0px 10px 10px 0px; color: #aaaaaa;">								<a href="{image}" target="_blank" onclick="ShowImgWindow('{name}','{image}', {image/@width}, {image/@height}); return false;">									<img src="{small_image}" style="border: 1px solid #DADADA; margin: 0px 5px 5px 0px"/>								</a>								<br/>								<a href="{image}" target="_blank" onclick="ShowImgWindow('{name}','{image}', {image/@width}, {image/@height}); return false;">									<img src="/hostcmsfiles/images/zoom.gif" alt="Увеличить" />								</a>							</div>						</xsl:if>												<!-- Цена товара -->						<p>Цена:							<span style="font-size: 11pt; font-weight: bold">								<xsl:choose>									<xsl:when test="price_discount != 0">										<xsl:value-of select="format-number(price_discount, '### ##0,00', 'my')"/>&#xA0;<xsl:value-of select="currency" disable-output-escaping="yes"/>									</xsl:when>									<xsl:otherwise>договорная</xsl:otherwise>								</xsl:choose>							</span>							<br/>														<!-- Если цена со скидкой - выводим ее -->							<xsl:if test="price_tax != price_discount">								<span style="color: gray; text-decoration: line-through;">									<xsl:variable name="price_tax" select="price_tax"/>									<span style="font-size: 11pt">										<xsl:value-of select="format-number($price_tax, '### ##0,00', 'my')"/>&#xA0;<xsl:value-of disable-output-escaping="yes" select="currency"/></span>								</span>								<br/>							</xsl:if>						</p>												<!-- Ссылку на добавление в корзины выводим, если:						type = 0 - простой тип товара						type = 1 - электронный товар, при этом остаток на складе больше 0 или -1,						что означает неограниченное количество -->						<xsl:if test="type = 0 or (type = 1 and (eitem_count > 0 or eitem_count = -1))">							<p>								<input type="text" size="3" value="1" id="count_{@id}"/>								<img src="/images/map_intocart.gif" width="12" height="21" border="0" usemap="#mapInToCart{@id}" style="margin: 0 0 -6px 1px;"/><a href="{/shop/path}cart/?action=add&amp;item_id={@id}" onclick="return AddIntoCart('{/shop/path}', {@id}, document.getElementById('count_{@id}').value)"><img alt="В корзину" title="В корзину" src="/hostcmsfiles/images/cart.gif" style="margin: 0px 0px -4px 10px" /></a>								<map name="mapInToCart{@id}">									<area shape="rect" coords="0,0,12,10"  onclick="set_count_mod('count_{@id}', 1);" nohref="nohref" />									<area shape="rect" coords="0,11,12,21" onclick="set_count_mod('count_{@id}', -1);" nohref="nohref" />								</map>															</p>						</xsl:if>												<xsl:if test="marking_of_goods != ''">						<p>Артикул: <b><xsl:value-of disable-output-escaping="yes" select="marking_of_goods"/></b></p>						</xsl:if>												<xsl:if test="producer/name != ''">						<p>Производитель: <b><xsl:value-of disable-output-escaping="yes" select="producer/name"/></b></p>						</xsl:if>												<!-- Если указан вес товара -->						<xsl:if test="weight != 0">							<p>Вес товара: <xsl:value-of select="weight"/>&#xA0;<xsl:value-of select="weight_mesure"/></p>						</xsl:if>												<!-- Показываем скидки -->						<xsl:if test="count(discount) &gt; 0">							<xsl:apply-templates select="discount"/>						</xsl:if>												<!-- Показываем количество на складе, если больше нуля -->						<xsl:if test="rest &gt; 0">							<p>В наличии: <xsl:value-of disable-output-escaping="yes" select="rest"/>&#xA0;<xsl:value-of disable-output-escaping="yes" select="mesure"/></p>						</xsl:if>												<!-- Описание товара -->						<xsl:value-of disable-output-escaping="yes" select="description" />												<!-- Если электронный товар, выведим доступное количество -->						<xsl:if test="type = 1">							<p>								<strong>									<xsl:choose>										<xsl:when test="eitem_count = 0">											Электронный товар закончился.										</xsl:when>										<xsl:when test="eitem_count = -1">											Электронный товар доступен для заказа.										</xsl:when>										<xsl:otherwise>										На складе осталось: <xsl:value-of select="eitem_count" /><xsl:text> </xsl:text><xsl:value-of select="mesure" />										</xsl:otherwise>									</xsl:choose>								</strong>							</p>						</xsl:if>												<!-- Текст товара -->						<p>							<xsl:value-of disable-output-escaping="yes" select="text"/>						</p>												<div style="clear: both;"></div>												<xsl:if test="count(property) > 0">							<h2>Атрибуты товара</h2>														<!-- Свойства в корневой группе -->							<xsl:if test="count(property[@dir_id = 0])">								<table border="0">									<xsl:apply-templates select="property[@dir_id = 0]"/>								</table>							</xsl:if>														<!-- Выбираем список групп свойств -->							<xsl:apply-templates select="/shop/properties_items_dir"/>						</xsl:if>					</div>										<!-- Тэги для информационного элемента -->					<xsl:if test="count(tags/tag) &gt; 0">						<p>							<img src="/hostcmsfiles/images/tags.gif" align="left" style="margin: 0px 5px -2px 0px"/>							<xsl:apply-templates select="tags/tag"/>						</p>					</xsl:if>										<!-- Модификации -->					<xsl:if test="count(modifications/item) &gt; 0">						<b>Модификации:</b>						<table cellspacing="3" cellpadding="3" style="margin-left: -6px;">							<tr>								<td style="border-bottom: 1px solid #dadada;">Название</td>								<td style="border-bottom: 1px solid #dadada;">Цена</td>							</tr>							<xsl:apply-templates select="modifications/item"/>						</table>					</xsl:if>										<xsl:if test="count(tying/item) &gt; 0">						<p>							<b>Сопутствующие товары:</b>						</p>						<!-- Отображаем сопутствующие товары -->						<xsl:apply-templates select="tying/item"/>						<div style="clear: both;"></div>					</xsl:if>										<!-- Отзывы о товаре -->					<xsl:if test="count(comments/comment) &gt; 0">						<p class="title">						<a name="comments"></a>Отзывы о товаре</p>						<xsl:apply-templates select="comments/comment" />					</xsl:if>										<div id="ShowAddComment">						<a href="javascript:void(0)" onclick="javascript:cr('AddComment')">Добавить комментарий</a>					</div>										<div id="AddComment" style="display: none">						<xsl:call-template name="AddCommentForm"></xsl:call-template>					</div>				</xsl:template>								<!-- Шаблон вывода добавления комментария -->				<xsl:template name="AddCommentForm">					<xsl:param name="comment_id" select="0"/>										<!-- Заполняем форму -->					<xsl:variable name="subject">						<xsl:if test="/document/form_parent_id/node() and /document/form_parent_id/node() and /document/form_parent_id= $comment_id">							<xsl:value-of select="/document/form_subject"/>						</xsl:if>					</xsl:variable>					<xsl:variable name="email">						<xsl:if test="/document/form_user_email/node() and /document/form_parent_id/node() and /document/form_parent_id= $comment_id">							<xsl:value-of select="/document/form_user_email"/>						</xsl:if>					</xsl:variable>					<xsl:variable name="text">						<xsl:if test="/document/form_text/node() and /document/form_parent_id/node() and /document/form_parent_id= $comment_id">							<xsl:value-of disable-output-escaping="yes" select="/document/form_text"/>						</xsl:if>					</xsl:variable>					<xsl:variable name="name">						<xsl:if test="/document/form_user_name/node() and /document/form_parent_id/node() and /document/form_parent_id= $comment_id">							<xsl:value-of select="/document/form_user_name"/>						</xsl:if>					</xsl:variable>										<div class="comment">						<div class="tl"></div>						<div class="tr"></div>						<div class="bl"></div>						<div class="br"></div>												<!--Отображение формы добавления комментария-->						<form action="{/document/url}" name="comment_form_0{comment_id}" method="post">							<!-- Авторизированным не показываем -->							<xsl:if test="/shop/user_id = 0">																Имя								<br/>								<input type="text" size="70" name="shop_comment_user_name" value="{/shop/shop_comment_user_name}"/>																<p>									E-mail									<br/>									<input id="email{$comment_id}" type="text" size="70" name="shop_comment_user_email" value="{/shop/shop_comment_user_email}"										onblur="FieldCheckEmail(this.id)"										onkeyup="FieldCheckEmail(this.id)"										onkeydown="FieldCheckEmail(this.id)" />									<div id="error_email{$comment_id}"></div>								</p>							</xsl:if>														<p>								Тема								<br/>								<input type="text" size="70" name="shop_comment_subject" value="{/shop/shop_comment_subject}"/>							</p>														<p>								Комментарий								<br/>								<textarea name="shop_comment_text" cols="68" rows="5" class="mceEditor"><xsl:value-of select="/shop/shop_comment_text"/></textarea>							</p>														<p>								Оценка								<br/>								<input type="hidden" name="shop_comment_grade" value="0"/>																<xsl:variable name="ul_id">									<xsl:choose>										<xsl:when test="comment_id > 0"><xsl:value-of select="comment_id"/>_stars</xsl:when>										<xsl:otherwise>0_stars</xsl:otherwise>									</xsl:choose>								</xsl:variable>																<ul id="{$ul_id}" class="stars">									<li onclick="set_rate(this.id, this.id)" onmouseover="set_rate(this.id, '-1')" onmouseout="set_rate(this.id, 0)" id="{comment_id}1_star_1"></li>									<li onclick="set_rate(this.id, this.id)" onmouseover="set_rate(this.id, '-1')" onmouseout="set_rate(this.id, 0)" id="{comment_id}2_star_2"></li>									<li onclick="set_rate(this.id, this.id)" onmouseover="set_rate(this.id, '-1')" onmouseout="set_rate(this.id, 0)" id="{comment_id}3_star_3"></li>									<li onclick="set_rate(this.id, this.id)" onmouseover="set_rate(this.id, '-1')" onmouseout="set_rate(this.id, 0)" id="{comment_id}4_star_4"></li>									<li onclick="set_rate(this.id, this.id)" onmouseover="set_rate(this.id, '-1')" onmouseout="set_rate(this.id, 0)" id="{comment_id}5_star_5"></li>								</ul>							</p>														<br/>														<!-- Обработка CAPTCHA -->							<xsl:if test="//captcha_key != 0 and /shop/user_id = 0">																Контрольные цифры								<sup>									<font color="red">*</font>								</sup>																<div style="float: left">									<img id="comment_{$comment_id}" style="border: 1px solid #000000" src="/captcha.php?get_captcha={captcha_key}{$comment_id}&amp;height=30&amp;width=100" title="Код подтверждения" name="captcha"/>								</div>																<div id="captcha" style="clear:both;">									<img style="border: 0px" src="/hostcmsfiles/images/refresh.gif" /> <a href="javascript:void(0);" onclick="ReNewCaptchaById('comment_{$comment_id}', '{//captcha_key}{$comment_id}', 30); return false;">Показать другое число</a>								</div>																<div style="float: left;margin-top: 5px">									<input type="hidden" name="captcha_key" value="{//captcha_key}{$comment_id}"/>									<input type="text" name="captcha_keystring" size="15"/>								</div>																<div id="captcha" style="clear:both;margin-bottom:10px;">									Введите число, которое указано выше.								</div>							</xsl:if>														<xsl:if test="$comment_id != 0">								<input type="hidden" name="comment_parent_id" value="{comment_id}"/>							</xsl:if>														<p>								<input id="submit_email{$comment_id}" type="submit" name="submit_comment" value="Опубликовать"/>							</p>						</form>					</div>				</xsl:template>								<!-- Вывод раздела для свойств товара -->				<xsl:template match="properties_items_dir">										<xsl:variable name="dir_id" select="@id"/>										<xsl:if test="count(/shop/item/property[@dir_id = $dir_id])">						<!-- Название группы свойств -->					<p><b><xsl:value-of select="shop_properties_items_dir_name"/></b></p>												<table border="0">							<xsl:apply-templates select="/shop/item/property[@dir_id = $dir_id]"/>						</table>					</xsl:if>										<xsl:if test="count(properties_items_dir) > 0">						<blockquote>							<xsl:apply-templates select="properties_items_dir"/>						</blockquote>					</xsl:if>				</xsl:template>								<!-- Вывод строки со значением свойства -->				<xsl:template match="property">					<xsl:if test="value != '' or (type = 1 and file_path != '')">						<tr>							<td style="padding: 5px" bgcolor="#eee">								<b><xsl:value-of select="name"/></b>							</td>							<td style="padding: 5px" bgcolor="#eee">								<xsl:choose>									<xsl:when test="type = 1">										<a href="{file_path}">Скачать файл</a>									</xsl:when>									<xsl:when test="type = 7">										<xsl:choose>											<xsl:when test="value = 1">												<input type="checkbox" checked="" disabled="" />											</xsl:when>											<xsl:otherwise>												<input type="checkbox" disabled="" />											</xsl:otherwise>										</xsl:choose>									</xsl:when>									<xsl:otherwise>										<xsl:value-of disable-output-escaping="yes" select="value"/>									</xsl:otherwise>								</xsl:choose>							</td>						</tr>					</xsl:if>				</xsl:template>												<!-- /// Метки для информационного элемента /// -->				<xsl:template match="tags/tag">					<a href="{/shop/path}tag/{tag_path_name}/" class="tag">						<xsl:value-of select="tag_name"/>					</a>					<xsl:if test="position() != last()">,</xsl:if>&#xA0;				</xsl:template>								<!-- Шаблон для модификаций -->				<xsl:template match="modifications/item">					<tr>						<td>							<!-- Название модификации -->							<a href="{/shop/path}{fullpath}{path}/">								<xsl:value-of disable-output-escaping="yes" select="name"/>							</a>						</td>						<td>							<!-- Цена модификации -->							<xsl:value-of disable-output-escaping="yes" select="price_discount"/>&#xA0;							<!-- Валюта -->							<xsl:value-of disable-output-escaping="yes" select="currency"/>						</td>					</tr>				</xsl:template>								<!-- Вывод рейтинга товара -->				<xsl:template name="show_average_grade">					<xsl:param name="grade" select="0"/>					<xsl:param name="const_grade" select="0"/>										<!-- Чтобы избежать зацикливания -->					<xsl:variable name="current_grade" select="$grade * 1"/>										<xsl:choose>						<!-- Если число целое -->						<xsl:when test="floor($current_grade) = $current_grade and not($const_grade &gt; ceiling($current_grade))">														<xsl:if test="$current_grade - 1 &gt; 0">								<xsl:call-template name="show_average_grade">									<xsl:with-param name="grade" select="$current_grade - 1"/>									<xsl:with-param name="const_grade" select="$const_grade - 1"/>								</xsl:call-template>							</xsl:if>														<xsl:if test="$current_grade != 0">								<img src="/hostcmsfiles/images/stars_single.gif"/>							</xsl:if>						</xsl:when>						<xsl:when test="$current_grade != 0 and not($const_grade &gt; ceiling($current_grade))">														<xsl:if test="$current_grade - 0.5 &gt; 0">								<xsl:call-template name="show_average_grade">									<xsl:with-param name="grade" select="$current_grade - 0.5"/>									<xsl:with-param name="const_grade" select="$const_grade - 1"/>								</xsl:call-template>							</xsl:if>														<img src="/hostcmsfiles/images/stars_half.gif"/>						</xsl:when>												<xsl:otherwise>							<!-- Выводим серые звездочки, пока текущая позиция не дойдет то значения, увеличенного до целого -->							<xsl:call-template name="show_average_grade">								<xsl:with-param name="grade" select="$current_grade"/>								<xsl:with-param name="const_grade" select="$const_grade - 1"/>							</xsl:call-template>							<img src="/hostcmsfiles/images/stars_gray.gif"/>						</xsl:otherwise>					</xsl:choose>				</xsl:template>								<!-- Шаблон для вывода звездочек (оценки) -->				<xsl:template name="for">					<xsl:param name="i" select="0"/>					<xsl:param name="n"/>										<input type="radio" name="shop_comment_grade" value="{$i}" id="id_shop_comment_grade_{$i}">						<xsl:if test="/shop/shop_comment_grade = $i">							<xsl:attribute name="checked">							</xsl:attribute>						</xsl:if>					</input>&#xA0;					<label for="id_shop_comment_grade_{$i}">						<xsl:call-template name="show_average_grade">							<xsl:with-param name="grade" select="$i"/>							<xsl:with-param name="const_grade" select="5"/>						</xsl:call-template>					</label>					<br/>					<xsl:if test="$n &gt; $i and $n &gt; 1">						<xsl:call-template name="for">							<xsl:with-param name="i" select="$i + 1"/>							<xsl:with-param name="n" select="$n"/>						</xsl:call-template>					</xsl:if>				</xsl:template>								<!-- Шаблон для отзывов -->				<xsl:template match="comments/comment">					<a name="comment{@id}"></a>					<div class="comment">						<div class="tl"></div>						<div class="tr"></div>						<div class="bl"></div>						<div class="br"></div>												<xsl:if test="subject != ''">							<div>								<strong>									<xsl:value-of select="subject"/>								</strong>							</div>						</xsl:if>												<xsl:value-of select="text" disable-output-escaping="yes"/>												<!-- Оценка комментария -->						<xsl:if test="grade != 0">							<div>Оценка:								<xsl:call-template name="show_average_grade">									<xsl:with-param name="grade" select="grade"/>									<xsl:with-param name="const_grade" select="5"/>								</xsl:call-template>							</div>						</xsl:if>					</div>										<div class="comment_desc">						<xsl:choose>							<xsl:when test="user_name">								<xsl:value-of select="user_name"/>							</xsl:when>							<xsl:otherwise>								<img src="/hostcmsfiles/images/user.gif"  style="margin: 0px 5px -4px 0px" />								<b>									<a href="/users/info/{site_user_login}/"  class="c_u_l" ><xsl:value-of select="site_user_login"/></a>								</b>							</xsl:otherwise>					</xsl:choose>&#xA0;·&#xA0;<xsl:value-of select="date_time"/>&#xA0;·&#xA0;<a href="{/shop/path}{/shop/item/fullpath}{/shop/item/path}/#comment{@id}" title="ссылка">#</a>					</div>				</xsl:template>								<!-- Шаблон для скидки -->				<xsl:template match="discount">					<p>						<xsl:value-of disable-output-escaping="yes" select="name"/>&#xA0;<xsl:value-of disable-output-escaping="yes" select="value"/>%					</p>				</xsl:template>								<xsl:template match="tying/item">										<div style="clear: both">						<p>							<a href="{/shop/path}{fullpath}{path}/">								<xsl:value-of select="name"/>							</a>						</p>												<!-- Изображение для товара, если есть -->						<xsl:if test="small_image != ''">							<a href="{/shop/path}{fullpath}{path}/">								<img src="{small_image}" align="left" style="border: 1px solid #000000; margin: 0px 5px 5px 0px"/>							</a>						</xsl:if>												<p>							<xsl:value-of disable-output-escaping="yes" select="description"/>						</p>												<!-- Цена товара -->						<strong>							<xsl:choose>								<xsl:when test="price_discount != 0">									<xsl:value-of disable-output-escaping="yes" select="price_discount"/>&#xA0;									<!-- Валюта товара -->									<xsl:value-of disable-output-escaping="yes" select="currency"/>								</xsl:when>								<xsl:otherwise>договорная</xsl:otherwise>							</xsl:choose>						</strong>												<!-- Если цена со скидкой - выводим ее -->						<xsl:if test="price_tax != price_discount">							<br/>							<font color="gray">								<strike>									<xsl:value-of disable-output-escaping="yes" select="price_tax"/>&#xA0;<xsl:value-of disable-output-escaping="yes" select="currency"/></strike>							</font>						</xsl:if>												<!-- Если указан вес товара -->						<xsl:if test="weight != 0">							<br/>Вес товара: <xsl:value-of select="weight"/> <xsl:value-of select="weight_mesure"/></xsl:if>												<!-- Показываем скидки -->						<xsl:if test="count(discount) &gt; 0">							<xsl:apply-templates select="discount"/>						</xsl:if>												<!-- Показываем количество на складе, если больше нуля -->						<xsl:if test="rest &gt; 0">							<br/>В наличии: <xsl:value-of disable-output-escaping="yes" select="rest"/></xsl:if>												<xsl:if test="producer/name != ''">							<br/>Производитель: <xsl:value-of disable-output-escaping="yes" select="producer/name"/></xsl:if>					</div>				</xsl:template>								<!-- Шаблон выводит хлебные крошки -->				<xsl:template match="group" mode="goup_path">					<xsl:variable name="parent_id" select="@parent"/>										<!-- Выбираем рекурсивно вышестоящую группу -->					<xsl:apply-templates select="//group[@id=$parent_id]" mode="goup_path"/>										<xsl:if test="@parent=0">						<a href="{/shop/path}">							<xsl:value-of select="/shop/name"/>						</a>					</xsl:if>										<span class="path_arrow">&#x2192;</span>										<a href="{/shop/path}{fullpath}">						<xsl:value-of select="name"/>					</a>				</xsl:template>			</xsl:stylesheet>
Добавлено через 1 минуту

вот XSL магазин каталог товаров

Код:
<?xml version="1.0" encoding="windows-1251"?><!DOCTYPE xsl:stylesheet><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">	<xsl:output xmlns="http://www.w3.org/TR/xhtml1/strict" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" encoding="Windows-1251" indent="yes" method="html" omit-xml-declaration="no" version="1.0" media-type="text/xml"/>		<xsl:decimal-format name="my" decimal-separator="," grouping-separator=" "/>		<xsl:template match="/">		<xsl:apply-templates select="/shop"/>	</xsl:template>		<!-- Шаблон для магазина -->	<xsl:template match="/shop">		<SCRIPT>		<xsl:comment>			<xsl:text disable-output-escaping="yes">				<![CDATA[				function set_count_mod(input_id, step)				{					var oCountMod = document.getElementById(input_id);					if (!(iCurrCount = parseInt(oCountMod.value))) {						iCurrCount = 0;					}					if (!(iCurrCount <= 0 && step < 0)) {						oCountMod.value = iCurrCount + step; 					}				}				]]>			</xsl:text>		</xsl:comment>	</SCRIPT>				<!-- Получаем ID родительской группы и записываем в переменную $parent_group_id -->		<xsl:variable name="parent_group_id" select="@current_group_id"/>				<!-- Если в находимся корне - выводим название информационной системы -->		<xsl:if test="$parent_group_id = 0">			<h1>				<xsl:value-of disable-output-escaping="yes" select="name"/>			</h1>		</xsl:if>				<!-- Если в находимся в группе - выводим название группы -->		<xsl:if test="$parent_group_id != 0">			<h1>				<xsl:value-of disable-output-escaping="yes" select=".//group[@id=$parent_group_id]/name"/>			</h1>		</xsl:if>				<!-- Обработка выбранных тэгов -->		<xsl:if test="count(selected_tags/tag) = 1">		<h2>Метка &#x97; <strong><xsl:value-of select="selected_tags/tag/tag_name"/></strong>.</h2>		</xsl:if>				<!-- Путь к группе -->		<div class="path">			<xsl:apply-templates select=".//group[@id=$parent_group_id]" mode="goup_path"/>		</div>				<xsl:variable name="count">1</xsl:variable>				<!-- Отображение подгрупп данной группы, только если подгруппы есть и не идет фильтра по меткам -->		<xsl:if test="count(selected_tags/tag) = 0 and count(//group[@parent=$parent_group_id]) &gt; 0">			<table width="100%" border="0" cellpadding="3" cellspacing="0">				<tr>					<td valign="top">						<xsl:apply-templates select="//group[@parent=$parent_group_id]"/>					</td>				</tr>			</table>		</xsl:if>				<xsl:if test="count(item) &gt; 0  or apply_filter = 1">			<form method="get" action="{/shop/path}{//group[@id=$parent_group_id]/fullpath}">				<div class="shop_block">					<div>						<!-- Если есть доступные производители -->						<xsl:if test="count(producerslist/producer) > 0">							Производитель:&#xA0;							<select name="producer_id">								<option value="0">&#x2026;</option>								<xsl:apply-templates select="producerslist/producer"/>							</select>&#xA0;						</xsl:if>												<!-- Если есть доступные продавцы -->						<xsl:if test="count(sallers/saller) > 0">							Продавец:&#xA0;							<select name="saller_id">								<option value="0">&#x2026;</option>								<xsl:apply-templates select="sallers/saller"/>							</select>&#xA0;						</xsl:if>												Цена от:&#xA0;						<input name="price_from" size="5" type="text">							<xsl:if test="/shop/price_from != 0">								<xsl:attribute name="value">									<xsl:value-of disable-output-escaping="yes" select="/shop/price_from"/>								</xsl:attribute>							</xsl:if>						</input>&#xA0;												до:&#xA0;						<input name="price_to" size="5" type="text">							<xsl:if test="/shop/price_to != 0">								<xsl:attribute name="value">									<xsl:value-of disable-output-escaping="yes" select="/shop/price_to"/>								</xsl:attribute>							</xsl:if>						</input>&#xA0;												<span style="white-space: nowrap">Товаров на странице:</span>&#xA0;						<select name="on_page">							<option value="0">&#x2026;</option>							<xsl:call-template name="for_on_page">								<xsl:with-param name="i" select="10"/>								<xsl:with-param name="n" select="50"/>							</xsl:call-template>						</select>&#xA0;					</div>									<xsl:if test="count(properties_for_group/property[property_show_kind != 0 and (shop_list_of_properties_type = 0 or shop_list_of_properties_type = 2 or shop_list_of_properties_type = 7)]) &gt; 0">						<p>							<b>Фильтр по дополнительным свойствам товара:</b>						</p>						<table cellpadding="10px" cellspacing="0">							<tr valign="top">								<xsl:apply-templates select="properties_for_group/property[property_show_kind != 0 and (shop_list_of_properties_type = 0 or shop_list_of_properties_type = 2 or shop_list_of_properties_type = 7)]"/>							</tr>						</table>					</xsl:if>					<div class="nofloat" style="margin-left: 40%">						<div class="gray_button">							<div>								<input name="apply_filter" value="Применить" type="submit"/>							</div>						</div>					</div>				</div>								<!-- Таблица с элементами для сравнения -->				<xsl:if test="count(/shop/compare_items/compare_item) &gt; 0">					<table cellpadding="5px" cellspacing="0" border="0">						<tr>							<td>								<input type="checkbox" onclick="SelectAllItemsByPrefix(this.checked, 'del_compare_id_')" />							</td>							<td>								<b>Сравниваемые элементы</b>							</td>						</tr>						<xsl:apply-templates select="compare_items/compare_item"/>					</table>					<div class="nofloat" style="height: 47px; padding: 5px 0;">						<div class="gray_button left">							<div>								<input name="apply_compare" value="Сравнить" type="button" onclick="javascript:location='{/shop/path}compare_items/';"/>							</div>						</div>						<div class="gray_button right">							<div>								<input name="delete_compare" value="Удалить" type="submit"/>							</div>						</div>					</div>					<!-- <input name="delete_all_compare" value="Удалить все" type="submit"/> -->				</xsl:if>								<!-- Сортировка товаров -->				<div class="shop_block">					<!-- Определяем ссылку с параметрами фильтра -->					<xsl:variable name="filter">						<xsl:if test="/shop/apply_filter/node()">?action=apply_filter&amp;producer_id=<xsl:value-of select="/shop/producer_id"/>&amp;saller_id=<xsl:value-of select="/shop/saller_id"/>&amp;price_from=<xsl:value-of select="/shop/price_from"/>&amp;price_to=<xsl:value-of select="/shop/price_to"/>&amp;on_page=<xsl:value-of select="/shop/on_page"/>							<xsl:if test="/shop/property_xml/node()">								<!-- GET для доп. свойств -->								<xsl:value-of select="/shop/property_xml"/>							</xsl:if>						</xsl:if>					</xsl:variable>										<!-- Определяем первый символ вопрос или амперсанд -->					<xsl:variable name="first_symbol">						<xsl:choose>							<xsl:when test="$filter != ''">&amp;</xsl:when>							<xsl:otherwise>?</xsl:otherwise>						</xsl:choose>					</xsl:variable>										Сортировать по алфавиту										<xsl:choose>						<xsl:when test="/shop/sort_by_field = 1 and /shop/order_direction = 'ASC'">							<div class="arrow_up"></div>							<img src="/hostcmsfiles/images/arrow_up.png" style="filter: alpha(opacity=0); margin: 0px 0px -4px 0px" alt="по возрастанию"/>						</xsl:when>						<xsl:otherwise>							<div class="arrow_up_gray"></div>							<a href="{$filter}{$first_symbol}sort_by_field=1&amp;order_direction=1" class="without_decor">								<img src="/hostcmsfiles/images/arrow_up_gray.png" style="filter: alpha(opacity=0); margin: 0px 0px -4px 0px" alt="по возрастанию"/>							</a>						</xsl:otherwise>					</xsl:choose>										<xsl:choose>						<xsl:when test="/shop/sort_by_field = 1 and /shop/order_direction = 'DESC'">							<div class="arrow_down"></div>							<img src="/hostcmsfiles/images/arrow_down.png" style="filter: alpha(opacity=0); margin: 0px 0px -4px 0px" alt="по убыванию"/>						</xsl:when>						<xsl:otherwise>							<div class="arrow_down_gray"></div>							<a href="{$filter}{$first_symbol}sort_by_field=1&amp;order_direction=2" class="without_decor">								<img src="/hostcmsfiles/images/arrow_down_gray.png" style="filter: alpha(opacity=0); margin: 0px 0px -4px 0px" alt="по убыванию"/>							</a>						</xsl:otherwise>					</xsl:choose>,&#xA0;по цене										<xsl:choose>						<xsl:when test="/shop/sort_by_field = 2 and /shop/order_direction = 'ASC'">							<div class="arrow_up"></div>							<img src="/hostcmsfiles/images/arrow_up.png" style="filter: alpha(opacity=0); margin: 0px 0px -4px 0px" alt="по возрастанию"/>						</xsl:when>						<xsl:otherwise>							<div class="arrow_up_gray"></div>							<a href="{$filter}{$first_symbol}sort_by_field=2&amp;order_direction=1" class="without_decor">								<img src="/hostcmsfiles/images/arrow_up_gray.png" style="filter: alpha(opacity=0); margin: 0px 0px -4px 0px" alt="по возрастанию"/></a>						</xsl:otherwise>					</xsl:choose>										<xsl:choose>						<xsl:when test="/shop/sort_by_field = 2 and /shop/order_direction = 'DESC'">							<div class="arrow_down"></div>							<img src="/hostcmsfiles/images/arrow_down.png" style="filter: alpha(opacity=0); margin: 0px 0px -4px 0px" alt="по убыванию"/>						</xsl:when>						<xsl:otherwise>							<div class="arrow_down_gray"></div>							<a href="{$filter}{$first_symbol}sort_by_field=2&amp;order_direction=2" class="without_decor">								<img src="/hostcmsfiles/images/arrow_down_gray.png" style="filter: alpha(opacity=0); margin: 0px 0px -4px 0px" alt="по убыванию"/>							</a>													</xsl:otherwise>					</xsl:choose>				</div>								<!-- Определяем ссылку с параметрами фильтра -->				<xsl:variable name="filter">					<xsl:choose>						<xsl:when test="/shop/apply_filter/node()">?action=apply_filter&amp;producer_id=<xsl:value-of select="/shop/producer_id"/>&amp;saller_id=<xsl:value-of select="/shop/saller_id"/>&amp;price_from=<xsl:value-of select="/shop/price_from"/>&amp;price_to=<xsl:value-of select="/shop/price_to"/>&amp;on_page=<xsl:value-of select="/shop/on_page"/>							<xsl:if test="/shop/property_xml/node()">								<!-- GET для доп. свойств -->								<xsl:value-of select="/shop/property_xml"/>							</xsl:if>						</xsl:when>						<xsl:otherwise></xsl:otherwise>					</xsl:choose>				</xsl:variable>				<!-- Определяем первый символ вопрос или амперсанд -->				<xsl:variable name="first_symbol">					<xsl:choose>						<xsl:when test="$filter != ''">&amp;</xsl:when>						<xsl:otherwise>?</xsl:otherwise>					</xsl:choose>				</xsl:variable>								<xsl:apply-templates select="item" />								<xsl:if test="count_items &gt; 0">					<div class="nofloat" style="height: 27px; padding: 0 0 20px 0;">						<div class="gray_button">							<div>								<input name="add_compare" value="Добавить для сравнения" type="submit" />							</div>						</div>					</div>				</xsl:if>								<xsl:if test="count(/shop/group[@id = /shop/@current_group_id]/propertys/property) > 0">					<div style="margin: 10px 0px;">						<h2>Атрибуты группы товаров</h2>												<xsl:if test="count(property[@dir_id = 0])">							<table border="0">								<xsl:apply-templates select="property[@dir_id = 0]"/>							</table>						</xsl:if>												<xsl:apply-templates select="/shop/properties_groups_dir"/>					</div>				</xsl:if>								<xsl:if test="count_items &gt; 0 and items_on_page &gt; 0">										<xsl:variable name="count_pages" select="ceiling(count_items div items_on_page)"/>										<xsl:variable name="visible_pages" select="5"/>										<xsl:variable name="real_visible_pages"><xsl:choose>							<xsl:when test="$count_pages &lt; $visible_pages"><xsl:value-of select="$count_pages"/></xsl:when>							<xsl:otherwise><xsl:value-of select="$visible_pages"/></xsl:otherwise>					</xsl:choose></xsl:variable>										<!-- Считаем количество выводимых ссылок перед текущим элементом -->					<xsl:variable name="pre_count_page"><xsl:choose>							<xsl:when test="current_page  - (floor($real_visible_pages div 2)) &lt; 0">								<xsl:value-of select="current_page"/>							</xsl:when>							<xsl:when test="($count_pages  - current_page - 1) &lt; floor($real_visible_pages div 2)">								<xsl:value-of select="$real_visible_pages - ($count_pages  - current_page - 1) - 1"/>							</xsl:when>							<xsl:otherwise>								<xsl:choose>									<xsl:when test="round($real_visible_pages div 2) = $real_visible_pages div 2">										<xsl:value-of select="floor($real_visible_pages div 2) - 1"/>									</xsl:when>									<xsl:otherwise>										<xsl:value-of select="floor($real_visible_pages div 2)"/>									</xsl:otherwise>								</xsl:choose>							</xsl:otherwise>					</xsl:choose></xsl:variable>										<!-- Считаем количество выводимых ссылок после текущего элемента -->					<xsl:variable name="post_count_page"><xsl:choose>							<xsl:when test="0 &gt; current_page - (floor($real_visible_pages div 2) - 1)">								<xsl:value-of select="$real_visible_pages - current_page - 1"/>							</xsl:when>							<xsl:when test="($count_pages  - current_page - 1) &lt; floor($real_visible_pages div 2)">								<xsl:value-of select="$real_visible_pages - $pre_count_page - 1"/>							</xsl:when>							<xsl:otherwise>								<xsl:value-of select="$real_visible_pages - $pre_count_page - 1"/>							</xsl:otherwise>					</xsl:choose></xsl:variable>										<xsl:variable name="i"><xsl:choose>							<xsl:when test="current_page + 1 = $count_pages"><xsl:value-of select="current_page - $real_visible_pages + 1"/></xsl:when>							<xsl:when test="current_page - $pre_count_page &gt; 0"><xsl:value-of select="current_page - $pre_count_page"/></xsl:when>							<xsl:otherwise>0</xsl:otherwise>					</xsl:choose></xsl:variable>										<p>						<xsl:call-template name="for">							<xsl:with-param name="items_on_page" select="items_on_page"/>							<xsl:with-param name="current_page" select="current_page"/>							<xsl:with-param name="count_items" select="count_items"/>							<xsl:with-param name="i" select="$i"/>							<xsl:with-param name="post_count_page" select="$post_count_page"/>							<xsl:with-param name="pre_count_page" select="$pre_count_page"/>							<xsl:with-param name="visible_pages" select="$real_visible_pages"/>						</xsl:call-template>					</p>					<div style="clear: both"></div>				</xsl:if>							</form>		</xsl:if>	</xsl:template>		<!-- Вывод раздела для свойств группы товаров -->	<xsl:template match="properties_groups_dir">			<p><b><xsl:value-of select="shop_properties_groups_dir_name"/></b></p>				<xsl:variable name="dir_id" select="@id"/>				<xsl:if test="count(/shop/group[@id = /shop/@current_group_id]/propertys/property)">			<table border="0">				<xsl:apply-templates select="/shop/group[@id = /shop/@current_group_id]/propertys/property[@parent_id = $dir_id]"/>			</table>		</xsl:if>				<xsl:if test="count(properties_groups_dir)">			<blockquote>				<xsl:apply-templates select="properties_groups_dir"/>			</blockquote>		</xsl:if>	</xsl:template>		<!-- Вывод строки со значением свойства -->	<xsl:template match="property">		<tr>			<td style="padding: 5px" bgcolor="#eee">				<b><xsl:value-of select="name"/></b>			</td>			<td style="padding: 5px" bgcolor="#eee">				<xsl:choose>					<xsl:when test="type = 1">						<a href="{file_path}">Скачать файл</a>					</xsl:when>					<xsl:when test="type = 7">						<xsl:choose>							<xsl:when test="value = 1">								<input type="checkbox" checked="" disabled="" />							</xsl:when>							<xsl:otherwise>								<input type="checkbox" disabled="" />							</xsl:otherwise>						</xsl:choose>					</xsl:when>					<xsl:otherwise>						<xsl:value-of disable-output-escaping="yes" select="value"/>					</xsl:otherwise>				</xsl:choose>			</td>		</tr>	</xsl:template>		<!-- Шаблон для списка товаров для сравнения -->	<xsl:template match="compare_items/compare_item">		<xsl:variable name="var_compare_id" select="."/>		<tr>			<td>				<input type="checkbox" name="del_compare_id_{compare_item_id}" id="id_del_compare_id_{compare_item_id}"/>			</td>			<td>				<a href="{/shop/path}{compare_item_fullpath}{compare_item_path}/">					<xsl:value-of disable-output-escaping="yes" select="compare_item_name"/>				</a>			</td>		</tr>	</xsl:template>		<!-- Шаблон для фильтра производителей -->	<xsl:template match="producerslist/producer">				<xsl:param name="id_prod" select="@id"/>		<!--		<xsl:variable name="node_name" select="concat('производители', $id_prod)"/>				<xsl:if test="count(/shop/*[name() = $node_name])">			-->						<option value="{@id}">				<xsl:if test="@id = /shop/producer_id">					<xsl:attribute name="selected"> </xsl:attribute>				</xsl:if>				<xsl:value-of disable-output-escaping="yes" select="name"/>			</option>			<!--		</xsl:if>		-->			</xsl:template>		<!-- Шаблон для фильтра продавцов -->	<xsl:template match="sallers/saller">		<option value="{@id}">			<xsl:if test="@id = /shop/saller_id">				<xsl:attribute name="selected">				</xsl:attribute>			</xsl:if>			<xsl:value-of select="sallers_name"/>		</option>	</xsl:template>		<!-- Шаблон для фильтра по дополнительным свойствам -->	<xsl:template match="properties_for_group/property">				<xsl:variable name="nodename">property_id_<xsl:value-of select="@id"/></xsl:variable>				<xsl:variable name="nodename_from">property_id_<xsl:value-of select="@id"/>_from</xsl:variable>		<xsl:variable name="nodename_to">property_id_<xsl:value-of select="@id"/>_to</xsl:variable>						<td>			<xsl:value-of disable-output-escaping="yes" select="property_name"/>&#xA0;			<xsl:if test="property_show_kind = 1">				<!-- Отображаем поле ввода -->				<br/>				<input type="text" name="property_id_{@id}">					<xsl:if test="/shop/*[name()=$nodename] != ''">						<xsl:attribute name="value">							<xsl:value-of select="/shop/*[name()=$nodename]"/>						</xsl:attribute>					</xsl:if>				</input>			</xsl:if>			<xsl:if test="property_show_kind = 2">				<!-- Отображаем список -->				<br/>				<select name="property_id_{@id}">					<option value="0">...</option>-->					<xsl:apply-templates select="list_items/list_item"/>				</select>			</xsl:if>			<xsl:if test="property_show_kind = 3">				<!-- Отображаем переключатели -->				<br/>				<input type="radio" name="property_id_{@id}" value="0" id="id_prop_radio_{@id}_0"></input>				<label for="id_prop_radio_{@id}_0">Любой вариант</label>				<xsl:apply-templates select="list_items/list_item"/>			</xsl:if>						<xsl:if test=" property_show_kind = 4">				<!-- Отображаем флажки -->				<xsl:apply-templates select="list_items/list_item"/>			</xsl:if>						<xsl:if test=" property_show_kind = 5">				<!-- Отображаем флажок -->				<br/>				<input type="checkbox" name="property_id_{@id}" id="property_id_{@id}" style="padding-top:4px">					<xsl:if test="/shop/*[name()=$nodename] != ''">						<xsl:attribute name="checked">							<xsl:value-of select="/shop/*[name()=$nodename]"/>						</xsl:attribute>					</xsl:if>				</input>				<label for="property_id_{@id}">Да</label>			</xsl:if>						<xsl:if test=" property_show_kind = 6">				<!-- Отображение полей "От.. До.." -->				<br/>				от: <input type="text" name="property_id_{@id}_from" size="5" value="{/shop/*[name()=$nodename_from]}"/> до: <input type="text" name="property_id_{@id}_to" size="5" value="{/shop/*[name()=$nodename_to]}"/>			</xsl:if>						<xsl:if test="property_show_kind = 7">				<!-- Отображаем список  с множественным выбором-->				<br/>				<select name="property_id_{@id}[]" multiple="">					<xsl:apply-templates select="list_items/list_item"/>				</select>			</xsl:if>		</td>		<xsl:if test="position() mod 6 = 0">			<xsl:text disable-output-escaping="yes">				&lt;/tr&gt;				&lt;tr valign="top"&gt;			</xsl:text>		</xsl:if>	</xsl:template>		<xsl:template match="list_items/list_item">		<xsl:if test="../../property_show_kind = 2">			<!-- Отображаем список -->			<xsl:variable name="nodename">property_id_<xsl:value-of select="../../@id"/></xsl:variable>			<option value="{@id}">				<xsl:if test="/shop/*[name()=$nodename] = @id">					<xsl:attribute name="selected">					</xsl:attribute>				</xsl:if>				<xsl:value-of disable-output-escaping="yes" select="list_item_value"/>			</option>		</xsl:if>		<xsl:if test="../../property_show_kind = 3">			<!-- Отображаем переключатели -->			<xsl:variable name="nodename">property_id_<xsl:value-of select="../../@id"/></xsl:variable>			<br/>			<input type="radio" name="property_id_{../../@id}" value="{@id}" id="id_property_id_{../../@id}_{@id}">				<xsl:if test="/shop/*[name()=$nodename] = @id">					<xsl:attribute name="checked">checked</xsl:attribute>				</xsl:if>				<label for="id_property_id_{../../@id}_{@id}">					<xsl:value-of disable-output-escaping="yes" select="list_item_value"/>				</label>			</input>		</xsl:if>		<xsl:if test="../../property_show_kind = 4">			<!-- Отображаем флажки -->			<xsl:variable name="nodename">property_id_<xsl:value-of select="../../@id"/>_item_id_<xsl:value-of select="@id"/></xsl:variable>			<br/>			<input type="checkbox" name="property_id_{../../@id}_item_id_{@id}" id="id_property_id_{../../@id}_{@id}">				<xsl:if test="/shop/*[name()=$nodename] = @id">										<xsl:attribute name="checked">checked</xsl:attribute>				</xsl:if>				<label for="id_property_id_{../../@id}_{@id}">					<xsl:value-of disable-output-escaping="yes" select="list_item_value"/>				</label>			</input>		</xsl:if>		<xsl:if test="../../property_show_kind = 7">			<!-- Отображаем список -->			<xsl:variable name="nodename">property_id_<xsl:value-of select="../../@id"/></xsl:variable>			<option value="{@id}">				<xsl:if test="/shop/*[name()=$nodename] = @id">					<xsl:attribute name="selected">					</xsl:attribute>				</xsl:if>				<xsl:value-of disable-output-escaping="yes" select="list_item_value"/>			</option>		</xsl:if>			</xsl:template>		<!-- Цикл с шагом 10 для select'a количества элементов на страницу -->	<xsl:template name="for_on_page">		<xsl:param name="i" select="0"/>		<xsl:param name="n"/>				<option value="{$i}">			<xsl:if test="$i = /shop/on_page">				<xsl:attribute name="selected">				</xsl:attribute>			</xsl:if>			<xsl:value-of select="$i"/>		</option>				<xsl:if test="$n &gt; $i">			<!-- Рекурсивный вызов шаблона -->			<xsl:call-template name="for_on_page">				<xsl:with-param name="i" select="$i + 10"/>				<xsl:with-param name="n" select="$n"/>			</xsl:call-template>		</xsl:if>	</xsl:template>		<!-- Шаблон для групп товара -->	<xsl:template match="group">				<xsl:variable name="parent_id" select="@parent"/>				<div style="margin-bottom: 15px;">			<a href="{/shop/path}{fullpath}" style="font-weight: bold">				<xsl:value-of disable-output-escaping="yes" select="name"/>		</a>&#xA0;<span style="color: #aaaaaa">(<xsl:value-of select="count_all_items"/>)</span>			<br/>			<xsl:value-of disable-output-escaping="yes" select="description"/>						<xsl:if test="count(group) &gt; 1">				<xsl:apply-templates select="group" mode="sub_group"/>			</xsl:if>		</div>				<xsl:if test="position()= round(count(//group[@parent = $parent_id]) div 2)">			<xsl:text disable-output-escaping="yes">				&lt;/td&gt;				&lt;td valign="top" width="50%"&gt;			</xsl:text>		</xsl:if>	</xsl:template>		<!-- Шаблон для подразделов -->	<xsl:template match="group" mode="sub_group">		<a href="{/shop/path}{fullpath}">			<xsl:value-of disable-output-escaping="yes" select="name"/>		</a>		<xsl:variable name="parent_id" select="@parent"/>		<!-- Ставим запятую после группы, за которой следуют еще группы из данной родителской группы -->		<xsl:if test="position() != last() and count(//group[@parent = $parent_id]) &gt; 1">,&#xA0;</xsl:if>	</xsl:template>		<!-- Шаблон для товара -->	<xsl:template match="item">						<!-- Определяем цвет фона -->		<xsl:variable name="background_color">			<xsl:choose>				<xsl:when test="(position() + 1) mod 2 &gt; 0">#f7f7f7</xsl:when>				<xsl:otherwise>#ffffff</xsl:otherwise>			</xsl:choose>		</xsl:variable>				<table width="97%" border="0" cellpadding="0" cellspacing="0" style="padding-bottom: 7px; margin-bottom: 15px; margin-right: 10px; border-bottom: 1px solid #dadada">			<tr>				<td colspan="4" style="padding-bottom: 4px">					<!-- Название товара -->					<div  style="font-size: 13pt">						<a href="{/shop/path}{fullpath}{path}/" class="cat_title">							<xsl:value-of disable-output-escaping="yes" select="name"/>						</a>					</div>				</td>			</tr>			<tr>				<td class="cat_t" style="width: 110px" valign="top">					<!-- Изображение для товара, если есть -->					<xsl:if test="small_image!=''">						<a href="{/shop/path}{fullpath}{path}/">							<img src="{small_image}" style="border: 1px solid #DADADA"/>						</a>					</xsl:if>				</td>				<td style="vertical-align:top;padding-left:12px;">										<!-- Описание товара -->					<xsl:value-of disable-output-escaping="yes" select="description"/>										<!-- Если электронный товар, выведим доступное количество -->					<xsl:if test="type = 1">						<p>							<strong>								<xsl:choose>									<xsl:when test="eitem_count = 0">										Электронный товар закончился.									</xsl:when>									<xsl:when test="eitem_count = -1">										Электронный товар доступен для заказа.									</xsl:when>									<xsl:otherwise>									На складе осталось: <xsl:value-of select="eitem_count" /><xsl:text> </xsl:text><xsl:value-of select="mesure" />									</xsl:otherwise>								</xsl:choose>							</strong>						</p>					</xsl:if>										<!-- Метки -->					<xsl:if test="count(tags/tag) &gt; 0">						<p>							<img src="/hostcmsfiles/images/tags.gif" align="left" style="margin: 0px 5px -2px 0px"/>							<xsl:apply-templates select="tags/tag"/>						</p>					</xsl:if>										<!-- Продавец -->					<xsl:if test="saller!=0">						<!-- Идентификатор текущего продавца -->						<p>							<xsl:variable name="saller_id" select="saller"/>							<b>Продавец:&#xA0;</b>							<a href="{/shop/path}sallers/saller-{saller}/">								<xsl:value-of select="/shop/sallers/saller[@id=$saller_id]/sallers_name"/>							</a>						</p>					</xsl:if>										<!-- Если указан вес товара -->					<xsl:if test="weight != 0">						<p>							Вес товара: <xsl:value-of select="weight"/>&#xA0;<xsl:value-of select="weight_mesure"/>						</p>					</xsl:if>										<!-- Скидки -->					<xsl:if test="count(discount) &gt; 0">						<p>							Скидки: <xsl:apply-templates select="discount"/>						</p>					</xsl:if>										<!-- Спеццены -->					<xsl:if test="count(shop_special_prices/special_price) &gt; 0">						<p>							<b>Специальные цены:</b>							<xsl:apply-templates select="shop_special_prices/special_price"/>						</p>					</xsl:if>										<!-- Вывод цен в другой валюте -->					<xsl:variable name="price" select="price_discount"/>										<xsl:if test="count(/shop/all_currency/shop_currency) > 1 and $price > 0">						<p><b>Цена в других валютах:</b>							<!-- Выбираем валюты -->							<xsl:for-each select="/shop/all_currency/shop_currency">								<!-- Выводим валюты кроме текущей -->								<xsl:if test="@id != /shop/shop_currency/@id">									<br /><xsl:value-of select="format-number($price * shop_currency_coefficient, '### ##0,00', 'my')"/>&#xA0;<xsl:value-of disable-output-escaping="yes" select="shop_currency_name"/>								</xsl:if>							</xsl:for-each>						</p>					</xsl:if>										<!-- Модификации -->					<xsl:if test="count(modifications/item) &gt; 0">						<b>Модификации:</b>						<table cellspacing="0" cellpadding="2">							<tr>								<td style="border-bottom: 1px solid #dadada;">Название</td>								<td style="border-bottom: 1px solid #dadada;">Цена</td>							</tr>							<xsl:apply-templates select="modifications/item"/>						</table>					</xsl:if>										<div style="margin-left: -4px; margin-top: 5px">						<xsl:variable name="var_compare_id" select="@id"/>						<input type="checkbox" name="compare_id_{@id}" id="id_compare_id_{@id}">						<label for="id_compare_id_{@id}">&#xA0;<span style="border-bottom: dashed 1px">Добавить для сравнения</span>&#xA0;</label>						</input>					</div>				</td>								<td width="128" valign="top" style="padding-left: 30px">					<xsl:if test="property[@xml_name = 'novinka']/value != '' and property[@xml_name = 'novinka']/value = 'Да'">						<img src="/images/new.gif"/>					</xsl:if>										<xsl:if test="property[@xml_name = 'hot']/value != '' and property[@xml_name = 'hot']/value = 'Да'">						<img src="/images/hot.gif"/>					</xsl:if>				</td>								<td width="130" class="cat_price_label" style="padding-left: 10px" valign="top">					<!-- Цена товара -->					<div style="display: inline">						<xsl:choose>							<xsl:when test="price_discount != 0">								<span style="font-size: 11pt">									<b>										<xsl:variable name="price" select="price_discount"/>										<xsl:value-of select="format-number($price, '### ##0,00', 'my')"/>&#xA0;										<!-- Валюта товара -->										<xsl:value-of disable-output-escaping="yes" select="currency"/>									</b>								</span>							</xsl:when>							<xsl:otherwise>								<span style="font-size: 11pt">									<b>цена&#xA0;договорная</b>								</span>							</xsl:otherwise>						</xsl:choose>						<br/>												<!-- Если цена со скидкой - выводим ее -->						<xsl:if test="price_tax != price_discount">							<span style="color: gray; text-decoration: line-through;">								<xsl:variable name="price_tax" select="price_tax"/>								<span style="font-size: 11pt">									<xsl:value-of select="format-number($price_tax, '### ##0,00', 'my')"/>&#xA0;<xsl:value-of disable-output-escaping="yes" select="currency"/></span>							</span>							<br/>						</xsl:if>												<!-- Ссылку на добавление в корзины выводим, если:						type = 0 - простой тип товара						type = 1 - электронный товар, при этом остаток на складе больше 0 или -1,						что означает неограниченное количество -->						<xsl:if test="type = 0 or (type = 1 and (eitem_count > 0 or eitem_count = -1))">							<div style="display: inline; margin-left: 3px">							<div class="left">								<input type="text" size="3" value="1" id="count_{@id}"/>																<img src="/images/map_intocart.gif" width="12" height="21" border="0" usemap="#mapInToCart{@id}" style="margin: 0 0 -6px 1px;"/>								<map name="mapInToCart{@id}">									<area shape="rect" coords="0,0,12,10"  onclick="set_count_mod('count_{@id}', 1);" nohref="nohref" />									<area shape="rect" coords="0,11,12,21" onclick="set_count_mod('count_{@id}', -1);" nohref="nohref" />								</map></div>																<a href="{/shop/path}cart/?action=add&amp;item_id={@id}" onclick="return AddIntoCart('{/shop/path}', {@id}, document.getElementById('count_{@id}').value)">									<img alt="В корзину" title="В корзину" src="/hostcmsfiles/images/cart.gif" style="margin: 0px 0px -4px 10px" />								</a>							</div>						</xsl:if>											</div>				</td>			</tr>		</table>	</xsl:template>		<!-- /// Метки для товаров /// -->	<xsl:template match="tags/tag">		<a href="{/shop/path}tag/{tag_path_name}/" class="tag">			<xsl:value-of select="tag_name"/>		</a>	<xsl:if test="position() != last()">,</xsl:if>&#xA0;</xsl:template>		<!-- Шаблон для модификаций -->	<xsl:template match="modifications/item">		<tr>			<td>				<!-- Название модификации -->				<a href="{/shop/path}{fullpath}{path}/">					<xsl:value-of disable-output-escaping="yes" select="name"/>				</a>			</td>			<td>				<!-- Цена модификации -->				<xsl:choose>					<xsl:when test="price_discount != 0">						<xsl:value-of disable-output-escaping="yes" select="price_discount"/>&#xA0;						<!-- Валюта товара -->						<xsl:value-of disable-output-escaping="yes" select="currency"/>					</xsl:when>					<xsl:otherwise>договорная</xsl:otherwise>				</xsl:choose>			</td>		</tr>	</xsl:template>		<!-- Шаблон для скидки -->	<xsl:template match="discount">		<br/>		<xsl:value-of disable-output-escaping="yes" select="name"/>&#xA0;		<xsl:value-of disable-output-escaping="yes" select="value"/>%</xsl:template>		<!-- Шаблон для спеццен -->	<xsl:template match="special_price">				<xsl:variable name="item_id" select="@item_id" />				<br/>		от <xsl:value-of select="shop_special_prices_from"/> до <xsl:value-of select="shop_special_prices_to"/>&#xA0;<xsl:value-of select="/shop/item[@id = $item_id]/mesure"/>		<xsl:text> </xsl:text>		—		<xsl:text> </xsl:text>		<xsl:value-of select="format-number(shop_special_prices_price,'### ##0,00', 'my')" />&#xA0;<xsl:value-of select="/shop/item[@id = $item_id]/currency"/>		за 1 <xsl:value-of select="/shop/item[@id = $item_id]/mesure"/>	</xsl:template>		<!-- Цикл для вывода строк ссылок -->	<xsl:template name="for">				<xsl:param name="items_on_page"/>		<xsl:param name="current_page"/>		<xsl:param name="pre_count_page"/>		<xsl:param name="post_count_page"/>		<xsl:param name="i" select="0"/>		<xsl:param name="count_items"/>		<xsl:param name="visible_pages"/>				<xsl:variable name="n" select="ceiling($count_items div $items_on_page)"/>				<xsl:variable name="start_page"><xsl:choose>				<xsl:when test="$current_page + 1 = $n"><xsl:value-of select="$current_page - $visible_pages + 1"/></xsl:when>				<xsl:when test="$current_page - $pre_count_page &gt; 0"><xsl:value-of select="$current_page - $pre_count_page"/></xsl:when>				<xsl:otherwise>0</xsl:otherwise>		</xsl:choose></xsl:variable>				<xsl:if test="$i = $start_page and $current_page != 0">			<span class="ctrl">				← Ctrl			</span>		</xsl:if>				<xsl:if test="$i = ($current_page + $post_count_page + 1) and $n != ($current_page+1)">			<span class="ctrl">				Ctrl →			</span>		</xsl:if>				<xsl:if test="$count_items &gt; $items_on_page and ($current_page + $post_count_page + 1) &gt; $i">			<!-- Заносим в переменную $parent_group_id идентификатор текущей группы -->			<xsl:variable name="parent_group_id" select="/shop/@current_group_id"/>						<!-- Путь для тэга -->			<xsl:variable name="tag_path">				<xsl:if test="count(/shop/selected_tags/tag) = 1">tag/<xsl:value-of select="/shop/selected_tags/tag/tag_path_name"/>/</xsl:if>			</xsl:variable>						<!-- Определяем группу для формирования адреса ссылки -->			<xsl:variable name="group_link">				<xsl:choose>					<!-- Если группа не корневая (!=0) -->					<xsl:when test="$parent_group_id != 0">						<xsl:value-of select="/shop//group[@id=$parent_group_id]/fullpath"/>					</xsl:when>					<!-- Иначе если нулевой уровень - просто ссылка на страницу со списком элементов -->					<xsl:otherwise></xsl:otherwise>				</xsl:choose>			</xsl:variable>						<!-- Определяем адрес ссылки -->			<xsl:variable name="number_link">				<xsl:choose>					<!-- Если не нулевой уровень -->					<xsl:when test="$i != 0">page-<xsl:value-of select="$i + 1"/>/</xsl:when>					<!-- Иначе если нулевой уровень - просто ссылка на страницу со списком элементов -->					<xsl:otherwise></xsl:otherwise>				</xsl:choose>			</xsl:variable>						<!-- Передаем фильтр -->			<xsl:variable name="filter">				<xsl:choose>					<xsl:when test="/shop/apply_filter/node()">?action=apply_filter&amp;producer_id=<xsl:value-of select="/shop/producer_id"/>&amp;saller_id=<xsl:value-of select="/shop/saller_id"/>&amp;price_from=<xsl:value-of select="/shop/price_from"/>&amp;price_to=<xsl:value-of select="/shop/price_to"/>&amp;on_page=<xsl:value-of select="/shop/on_page"/>						<xsl:if test="/shop/property_xml/node()">							<!-- GET для доп. свойств -->							<xsl:value-of select="/shop/property_xml"/>						</xsl:if>					</xsl:when>					<xsl:otherwise></xsl:otherwise>				</xsl:choose>			</xsl:variable>						<!-- Определяем первый символ вопрос или амперсанд -->			<xsl:variable name="first_symbol">				<xsl:choose>					<xsl:when test="$filter != ''">&amp;</xsl:when>					<xsl:otherwise>?</xsl:otherwise>				</xsl:choose>			</xsl:variable>						<!-- Данные для стрелок сортировки -->			<xsl:variable name="arrows">				<xsl:choose>					<xsl:when test="(/shop/sort_by_field = 1) or (/shop/sort_by_field = 2)">						<xsl:choose>							<!-- Стрелка вверх -->							<xsl:when test="/shop/order_direction = 'ASC'">								<xsl:value-of select="$first_symbol"/>sort_by_field=<xsl:value-of select="/shop/sort_by_field"/>&amp;order_direction=1</xsl:when>							<!-- Стрелка вниз -->							<xsl:otherwise>								<xsl:value-of select="$first_symbol"/>sort_by_field=<xsl:value-of select="/shop/sort_by_field"/>&amp;order_direction=2</xsl:otherwise>						</xsl:choose>					</xsl:when>					<xsl:otherwise></xsl:otherwise>				</xsl:choose>			</xsl:variable>						<!-- Выводим ссылку на первую страницу -->			<xsl:if test="$current_page - $pre_count_page &gt; 0 and $i = $start_page">				<a href="{/shop/path}{$group_link}{$tag_path}{$filter}{$arrows}" class="page_link" style="text-decoration: none;">&#x2190;</a>			</xsl:if>						<!-- Ставим ссылку на страницу-->			<xsl:if test="$i != $current_page">				<xsl:if test="($current_page - $pre_count_page) &lt;= $i and $i &lt; $n">					<!-- Выводим ссылки на видимые страницы -->					<a href="{/shop/path}{$group_link}{$tag_path}{$number_link}{$filter}{$arrows}" class="page_link">						<xsl:value-of select="$i + 1"/>					</a>				</xsl:if>								<!-- Выводим ссылку на последнюю страницу -->				<xsl:if test="$i+1 &gt;= ($current_page + $post_count_page + 1) and $n &gt; ($current_page + 1 + $post_count_page)">					<!-- Выводим ссылку на последнюю страницу -->					<a href="{/shop/path}{$group_link}{$tag_path}page-{$n}/{$filter}{$arrows}" class="page_link" style="text-decoration: none;">&#x2192;</a>				</xsl:if>			</xsl:if>						<!-- Ссылка на предыдущую страницу для Ctrl + влево -->			<xsl:if test="$current_page != 0 and $i = $current_page">				<xsl:variable name="prev_number_link">					<xsl:choose>						<!-- Если не нулевой уровень -->						<xsl:when test="($current_page - 1) != 0">page-<xsl:value-of select="$i"/>/</xsl:when>						<!-- Иначе если нулевой уровень - просто ссылка на страницу со списком элементов -->						<xsl:otherwise></xsl:otherwise>					</xsl:choose>				</xsl:variable>								<a href="{/shop/path}{$group_link}{$tag_path}{$prev_number_link}{$filter}{$arrows}" id="id_prev"></a>			</xsl:if>						<!-- Ссылка на следующую страницу для Ctrl + вправо -->			<xsl:if test="($n - 1) > $current_page and $i = $current_page">				<a href="{/shop/path}{$group_link}{$tag_path}page-{$current_page+2}/{$filter}{$arrows}" id="id_next"></a>			</xsl:if>						<!-- Не ставим ссылку на страницу-->			<xsl:if test="$i = $current_page">				<span class="current">					<xsl:value-of select="$i+1"/>				</span>			</xsl:if>						<!-- Рекурсивный вызов шаблона. НЕОБХОДИМО ПЕРЕДАВАТЬ ВСЕ НЕОБХОДИМЫЕ ПАРАМЕТРЫ! -->			<xsl:call-template name="for">				<xsl:with-param name="i" select="$i + 1"/>				<xsl:with-param name="items_on_page" select="$items_on_page"/>				<xsl:with-param name="current_page" select="$current_page"/>				<xsl:with-param name="count_items" select="$count_items"/>				<xsl:with-param name="pre_count_page" select="$pre_count_page"/>				<xsl:with-param name="post_count_page" select="$post_count_page"/>				<xsl:with-param name="visible_pages" select="$visible_pages"/>			</xsl:call-template>		</xsl:if>	</xsl:template>		<!-- Шаблон выводит рекурсивно ссылки на группы инф. элемента -->	<xsl:template match="group" mode="goup_path">		<xsl:param name="parent_id" select="@parent"/>				<!-- Получаем ID родительской группы и записываем в переменную $parent_group_id -->		<xsl:param name="parent_group_id" select="/shop/@current_group_id"/>				<xsl:apply-templates select="//group[@id=$parent_id]" mode="goup_path"/>				<xsl:if test="@parent=0">			<a href="{/shop/path}">				<xsl:value-of select="/shop/name"/>			</a>		</xsl:if>				<span class="path_arrow">&#x2192;</span>				<xsl:choose>			<xsl:when test="$parent_group_id = @id">				<xsl:value-of disable-output-escaping="yes" select="name"/>			</xsl:when>			<xsl:otherwise>				<a href="{/shop/path}{fullpath}">					<xsl:value-of disable-output-escaping="yes" select="name"/>				</a>			</xsl:otherwise>		</xsl:choose>	</xsl:template></xsl:stylesheet>

Последний раз редактировалось vitaly-go; 16.03.2010 в 11:01.. Причина: Добавлено сообщение
 
Старый 16.03.2010, 15:49   #53
Народ. А подскажите плиз. А чем вот эта самая HostCMS лучше MODx?
Вот с UMI всё понятно. А тут - как зашёл на демосайт - опупел по полной. Логика где то рядом.
Ну вот к примеру: Даже бесплатный MODx поддерживает метаструктуру (на уровне переменных шаблона). А как дела с ней обстоят в HostCMS?
 
Старый 16.03.2010, 16:10   #54
Цитата:
Сообщение от Асмодиан Посмотреть сообщение
А тут - как зашёл на демосайт - опупел по полной. Логика где то рядом.
ну какбы я ее ярый поклонник в виду того что с моей (может неправильной но всеже логикой) она совпадает,
и при отсутствии програмерских больших познаний вполне удобна если сравнивать с WP Joomla ДЛЕ Drupal и прочих.
Описанные вами еще непробовал, надо хоть в одной разобраться
кстати последний вопрос помоему почти снят как докручу до конца напишу себе тут пост-пямятку о решении вопроса,
благо добрые люди нашлись разжевали олуху)))

Последний раз редактировалось vitaly-go; 16.03.2010 в 16:12..
 
Старый 16.03.2010, 16:29   #55
vitaly-go, Нашёл сравнение. Да Joomla в полном отстое, даже если её с самописным шаблонизатором сравнить.
 
Старый 16.03.2010, 16:35   #56
Асмодиан представьте себе меня (всю жизнь занимался мебелью рекламой (наружка\полиграфия) 3d фасады интерьеры) и вот я решил научиться еще и этому,
зареген я на фрилансе и смотрю все специализации и естественно вначале выберу гребаную ждумлу будь она неладна, потомучто упоминание сего (почти матерного слова)) слишком часто в просторах рунета, потом WP ДЛЕ и так далее, прийду к тому что устроит
 
Старый 16.03.2010, 16:37   #57
Цитата:
А как дела с ней обстоят в HostCMS?
Нормально
 
Старый 16.03.2010, 16:38   #58
Где их найти?
 
Старый 16.03.2010, 16:40   #59
вроде динамические страницы
 
Старый 16.03.2010, 18:40   #60
в продолжение последнего вопроса
ответ:
1- создаем списки (в моем случае - Автомобиль, Модель, Ширина и тп)
2- заходим в магазин --(вверху) Товар -- Свойства товара( в нем добавить) называем и выбираем "список-списком" тип - "список" ( и в самом низу) списки-"Автомобиль".
на текущий момент это поле будет доступно при редактировании товара в закладке (дополнительные параметры) НО не будет видна в фильтре в магазине для покупателя
3- в админке заходим в нужный раздел (у нас это "Шины") и опять (вверху) "Товар" --> Свойства товаров для группы --> включаем лампочку(Доступность) в таблице справа
4 - радуемся жизни
_______________
но недолго
вот пример
выбираем автомобиль Ford , далее выбираем Модель (например С-max) и радуемся жизни, фильтр выберет товар с данным параметром,
но если например НЕ Ford а BMW?
выбрали BMW нажимаем на выбор модели а у нас в этом списке до сих пор присутствуют модели других авто,
как сделать эти списки зависимыми?
тоесть выбрал форд и в списке моделей остались модели только форда?
 
Старый 16.03.2010, 18:40
Закрытая тема




Похожие темы
Тема Автор Раздел Ответов Последнее сообщение
WP3 и мои глупые вопросы 2 vitaly-go HTML, CSS, JavaScript 39 25.10.2011 16:14
HostCMS и мои глупые вопросы 3 vitaly-go HTML, CSS, JavaScript 6 25.10.2011 15:46
WP3 и мои глупые вопросы vitaly-go HTML, CSS, JavaScript 19 14.04.2011 13:40
HostCMS и мои глупые вопросы 2 vitaly-go HTML, CSS, JavaScript 2 07.02.2011 13:29
Движок форума phpBB и все мои глупые вопросы с ним связанные sokol666 ASP, Perl, PHP и MySQL 18 08.12.2009 15:05


Текущее время: 17:12. Часовой пояс GMT +4.

Реклама на форуме Условия размещения рекламы
Биржа ссылок Заработай на сайте!
Дизайнерский форум