<?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 method="html" indent="yes" encoding="Windows-1251"/>

<!-- Шаблон для типов доставки -->
<xsl:template match="/types_of_delivery">

<form name="address" id="address" method="POST">
	<h1>Способ доставки</h1>
	
	<!-- Проверяем количество способов доставки -->
	<xsl:choose>
		<xsl:when test="count_cond_of_delivery=0">
			<p>По выбранным Вами условиям доставка не возможна, заказ будет оформлен без доставки.</p>
			<p>Уточнить данные о доставке Вы можете, связавшись с представителем нашей компании.</p>
			<input type="hidden" name="type_of_delivery" value="0"/>
		</xsl:when>
		<xsl:otherwise>
		
			<table cellspacing="0" cellpadding="0" border="0">
			<tr class="shop_cart_table_title">
				<td>Способ доставки</td>
				<td>Описание</td>
				<td>Цена доставки</td>
				<td>Стоимость товаров</td>
				<td>Итого</td>
			</tr>
			
			<xsl:apply-templates select="type_of_delivery"/>
			
			</table>
		</xsl:otherwise>
	</xsl:choose>
	<p><input name="step_3" value="Далее >>" type="submit"/></p>
</form>

</xsl:template>

<xsl:template match="type_of_delivery">

<tr class="shop_cart_table">
<td>
	<input type="radio" value="{shop_cond_of_delivery_id}" id="cond_of_delivery{shop_cond_of_delivery_id}" name="cond_of_delivery" style="border: 0px" />
		&#xA0;<label for="cond_of_delivery{shop_cond_of_delivery_id}"><b><xsl:value-of select="name"/></b></label>
</td>
<td width="600">
		<!-- Описание доставки -->
		<p><xsl:value-of disable-output-escaping="yes" select="description"/></p>
</td>
<td>
<xsl:value-of select="price"/>&#xA0;<xsl:value-of select="/types_of_delivery/shop/shop_currency/shop_currency_name"/>
</td>
<td>
	<xsl:value-of select="cart_sum"/>&#xA0;
	<xsl:value-of select="/types_of_delivery/shop/shop_currency/shop_currency_name"/>
</td>
<td style="font-weight: bold">
<xsl:value-of select="total"/>&#xA0;
<xsl:value-of select="/types_of_delivery/shop/shop_currency/shop_currency_name"/>
</td>
</tr>
</xsl:template>

</xsl:stylesheet>