Опции товара в корзине

Copy
<!-- Шаблон для товара в корзине --><xsl:template match="shop_cart">	<xsl:variable name="item_id" select="shop_item_id" />	<xsl:variable name="id" select="shop_item[@id = $item_id]/@id" />	<xsl:variable name="shop_item" select="shop_item[@id = $item_id]" />	<xsl:variable name="price">		<xsl:value-of disable-output-escaping="yes" select="sum(hostdev_shop_option_value/price) + $shop_item/price" />	</xsl:variable>	<xsl:variable name="oldoption_param">		<xsl:call-template name="option_param">			<xsl:with-param name="shop_item" select="shop_item" />			<xsl:with-param name="prefix">oldoption</xsl:with-param>			<xsl:with-param name="cart" select="." />		</xsl:call-template>	</xsl:variable>	<xsl:variable name="option_param">		<xsl:call-template name="option_param">			<xsl:with-param name="shop_item" select="shop_item" />			<xsl:with-param name="prefix">option</xsl:with-param>			<xsl:with-param name="cart" select="." />		</xsl:call-template>	</xsl:variable>	<tr>		<td>			<a href="{shop_item/url}">				<xsl:value-of disable-output-escaping="yes" select="shop_item/name" />			</a>			<xsl:apply-templates select="/shop/hostdev_shop_options/hostdev_shop_option" mode="cart">				<xsl:with-param name="shop_item" select="$shop_item" />				<xsl:with-param name="oldoption" select="$oldoption_param" />				<xsl:with-param name="cart" select="." />				<xsl:with-param name="position" select="position()" />			</xsl:apply-templates>		</td>		<td>			<xsl:variable name="options_string">				<xsl:for-each select="hostdev_shop_option_value">					<xsl:sort order="ascending" data-type="number" select="@id" />_					<xsl:value-of disable-output-escaping="yes" select="@id" />				</xsl:for-each>			</xsl:variable>			<input type="text" size="3" name="quantity_{shop_item/@id}{$options_string}" id="quantity_{shop_item/@id}" value="{quantity}" />		</td>		<td>			<!-- Цена -->			<xsl:value-of select="format-number($price, '### ##0.00', 'my')" />			<xsl:text></xsl:text>			<xsl:value-of select="shop_item/currency" disable-output-escaping="yes" />		</td>		<td>			<!-- Сумма -->			<xsl:value-of disable-output-escaping="yes" select="format-number($price * quantity, '### ##0.00', 'my')" />			<xsl:text></xsl:text>			<xsl:value-of disable-output-escaping="yes" select="shop_item/currency" />		</td>		<td align="center">			<a href="?delete={shop_item/@id}{$option_param}" onclick="return confirm('Вы уверены, что хотите удалить?')" title="Удалить товар из корзины" alt="Удалить товар из корзины">Удалить</a>		</td>	</tr></xsl:template>

30.03.2023