# promotions/index.php

## Página "Convenios"

Este template le permite a un usuario acceder al listado de convenios que tiene asignado su tipo de cliente.

| Objetos disponibles  | Descripción                |
| -------------------- | -------------------------- |
| $\_userTypePromotion | Convenios.                 |
| $\_total             | Número total de convenios. |

{% hint style="info" %}
Para visualizar este template el usuario debe estar autenticado
{% endhint %}

#### Código de ejemplo

{% code title="promotions/index.php" %}

```php
<h1>Mis convenios</h1>
		
<table class="account">
	<tr>
		<th>Desde</th>
		<th>Hasta</th>
		<th>Descuento</th>
		<th>Límite diario</th>
		<th>Semanal</th>
		<th>Mensual</th>
		<th></th>
	</tr>
	<?php while($_userTypePromotion->getNext()): ?>
	<tr onclick="location.href='<?=$_userTypePromotion->getURL()?>'">
		<td><?=$_front->date($_userTypePromotion->get('start'))?></td>
		<td><?=$_front->date($_userTypePromotion->get('end'))?></td>
		<td><?=($_userTypePromotion->get('priceType') == 0 ? $_front->price($_userTypePromotion->get('priceValue')) : $_userTypePromotion->get('priceValue').'%')?></td>
		<td><?=($_userTypePromotion->get('maxPerDay') ? $_userTypePromotion->get('maxPerDay') : 'Sin límite')?></td>
		<td><?=($_userTypePromotion->get('maxPerWeek') ? $_userTypePromotion->get('maxPerWeek') : 'Sin límite')?></td>
		<td><?=($_userTypePromotion->get('maxPerMonth') ? $_userTypePromotion->get('maxPerMonth') : 'Sin límite')?></td>
	</tr>
	<?php endwhile; ?>
</table>
html
```

{% 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://ventaspop.gitbook.io/docs/convenios/promotions-index.php.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.
