# Настройка XSL шаблона товара

Пример шаблона находится в **"XSL-шаблоны" -> "asmp\_subscription" -> "МагазинТовар \[subscription] \[ДАТА]"**

В том месте где вы хотите выводить кнопку на подписку вставтье следущий код

{% code fullWidth="true" %}

```html
<xsl:template match="shop_item">
	<!-- $shop_item_id - ID товара -->
	
	<!-- подписка о поступлении товара -->
	<div class="subscribe_block0">
		<xsl:choose>
			<xsl:when test="/shop/asmp_subscription[type=0]">
				<a class="subscribe_b-link" href="javascript:;" onclick="return $.getUnsubscribe({{id:{/shop/asmp_subscription/@id}}})">Отписаться от уведомлений о поступлении товара</a>
			</xsl:when>
			<xsl:otherwise>
				<a class="subscribe_b-link" href="javascript:;" onclick="return $.getSubscribe({{id:{@id},type:0}})">Узнать о поступлении товара</a>
			</xsl:otherwise>
		</xsl:choose>
	</div>
	<!-- //подписка о поступлении товара -->
	
	<!-- подписка о снижении цены -->
	<div class="subscribe_block1">
		<xsl:choose>
			<xsl:when test="/shop/asmp_subscription[type=1]">
				<a class="subscribe_b-link" href="javascript:;" onclick="return $.getUnsubscribe({{id:{/shop/asmp_subscription/@id}}})">Отписаться от уведомлений о снижении цены</a>
			</xsl:when>
			<xsl:otherwise>
				<a class="subscribe_b-link" href="javascript:;" onclick="return $.getSubscribe({{id:{@id},type:1}})">Узнать о снижении цены</a>
			</xsl:otherwise>
		</xsl:choose>
	</div>
	<!-- //подписка о снижении цены  -->
	
</xsl:template>
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.morozovpimnev.ru/subscription/nastroika-xsl-shablona-tovara.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
