Weber,
Для реализации вывода пользователю информации о заказанных им товарах после оформления заказа необходимо в обработчиках форм оплаты заменить:
/* Формируем XML */
$xmlData = '<?xml version="1.0" encoding="'.SITE_CODING.'"?>'."\n";
$xmlData .= '<order>';
/* Ссылака на версию для печати */
$shop_row = $GLOBALS['shops']->GetShop($shop_id);
if ($shop_row)
{
/* Получаем путь к магазину */
$Structure = new Structure();
$shop_path = "/".$Structure->GetStructurePath($shop_row['structure_id'], 0);
$shop_path .= "cart/print/$order_id/";
$xmlData .= "<print_link>".$shop_path."</print_link>";
}
$xmlData .= "</order>\n";
на
/* Формируем XML */
$xmlData = '<?xml version="1.0" encoding="'.SITE_CODING.'"?>'."\n";
$xmlData .= '<document_list>'."\n";
/* Ссылака на версию для печати */
$shop_row = $GLOBALS['shops']->GetShop($shop_id);
if ($shop_row)
{
/* Получаем путь к магазину */
$Structure = new Structure();
$shop_path = "/".$Structure->GetStructurePath($shop_row['structure_id'], 0);
$shop_path .= "cart/print/$order_id/";
$xmlData .= "<print_link>".$shop_path."</print_link>";
}
$xmlData .= $GLOBALS['shops']->GetXmlForOrder($order_id, false, true);
$xmlData .= $GLOBALS['shops']->GetXmlForItemsOrder($order_id);
$xmlData .= '</document_list>'."\n";
и внести корректировки в 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" encoding="Windows-1251" indent="yes" method="html" omit-xml-declaration="no" version="1.0" />
<!-- Шаблон "ОплатаПриПолучении" -->
<xsl:template match="/document_list">
<h1>Ваш заказ оформлен</h1>
<xsl:apply-templates select="order_list"/>
<h2>Заказанные товары</h2>
<table cellpadding="2" cellspacing="0">
<tr class="shop_cart_table">
<td>Наименование</td>
<td>Количество</td>
<td>Цена</td>
<td>Сумма</td>
</tr>
<xsl:apply-templates select="items_order"/>
<tr class="shop_cart_table">
<td colspan="4" align="right">
Итого: <xsl:value-of select="order_list/sum"/> <xsl:value-of select="order_list/currency/currency_name"/>
</td>
</tr>
</table>
<p>Через некоторое время с Вами свяжется наш менеджер, чтобы согласовать заказанный товар и время доставки.</p>
<p>Спасибо за использование услуг нашего магазина.</p>
</xsl:template>
<!-- Шаблон вывода данных о заказе -->
<xsl:template match="order_list">
<h2>Данные доставки</h2>
<p>ФИО: <xsl:value-of select="site_user_fio"/></p>
<p>E-mail: <xsl:value-of select="site_users_email"/></p>
<p>Телефон: <xsl:value-of select="site_users_phone"/></p>
<p>Факс: <xsl:value-of select="site_users_fax"/></p>
<xsl:variable name="country" select="country_name"/>
<xsl:variable name="location">, <xsl:value-of select="location_name"/></xsl:variable>
<xsl:variable name="city">, <xsl:value-of select="city_name"/></xsl:variable>
<xsl:variable name="city_area">, <xsl:value-of select="city_area_name"/></xsl:variable>
<p>Адрес доставки:
<xsl:value-of select="$country"/>
<xsl:value-of select="$location"/>
<xsl:value-of select="$city"/>
<xsl:value-of select="$city_area"/> <xsl:value-of select="address"/></p>
<p>Индекс: <xsl:value-of select="index"/></p>
<xsl:if test="phone!=''">
<p>Телефон: <xsl:value-of select="phone"/></p>
</xsl:if>
</xsl:template>
<!-- Данные о товарах -->
<xsl:template match="items_order">
<xsl:variable name="quantity"><xsl:value-of select="order_items_quantity"/></xsl:variable>
<xsl:variable name="price"><xsl:value-of select="order_items_price"/></xsl:variable>
<tr class="shop_cart_table">
<td>
<xsl:choose>
<xsl:when test="item/path != ''">
<a href="http://{//order_list/shop/site_alias_name}{//order_list/shop/shop_path}{item/fullpath}{item/path}/"><xsl:value-of select="order_items_name"/></a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="order_items_name"/>
</xsl:otherwise>
</xsl:choose>
</td>
<td><xsl:value-of select="$quantity"/> <xsl:value-of select="item/mesure"/></td>
<td><xsl:value-of select="$price"/> <xsl:value-of select="//order_list/currency/currency_name"/></td>
<td><xsl:value-of select="$quantity*$price"/> <xsl:value-of select="//order_list/currency/currency_name"/></td>
</tr>
</xsl:template>
</xsl:stylesheet>
ОплатаПоФормеПД4
<?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" encoding="Windows-1251" indent="yes" method="html" omit-xml-declaration="no" version="1.0" />
<!-- XSL-шаблон "ОплатаПоФормеПД4" -->
<xsl:template match="/document_list">
<h1>Ваш заказ оформлен</h1>
<xsl:apply-templates select="order_list"/>
<h2>Заказанные товары</h2>
<table cellpadding="2" cellspacing="0">
<tr class="shop_cart_table">
<td>Наименование</td>
<td>Количество</td>
<td>Цена</td>
<td>Сумма</td>
</tr>
<xsl:apply-templates select="items_order"/>
<tr class="shop_cart_table">
<td colspan="4" align="right">
Итого: <xsl:value-of select="order_list/sum"/> <xsl:value-of select="order_list/currency/currency_name"/>
</td>
</tr>
</table>
<p>Распечатайте <a href="{/document_list/print_link}" target="_blank">бланк квитанции по форме ПД-4</a>, вырежьте бланк квитанции и оплатитите его в отделении банка.</p>
<p>Через некоторое время с Вами свяжется наш менеджер, чтобы согласовать заказанный товар и время доставки.</p>
<p>Спасибо за использование услуг нашего магазина.</p>
</xsl:template>
<!-- Шаблон вывода данных о заказе -->
<xsl:template match="order_list">
<h2>Данные доставки</h2>
<p>ФИО: <xsl:value-of select="site_user_fio"/></p>
<p>E-mail: <xsl:value-of select="site_users_email"/></p>
<p>Телефон: <xsl:value-of select="site_users_phone"/></p>
<p>Факс: <xsl:value-of select="site_users_fax"/></p>
<xsl:variable name="country" select="country_name"/>
<xsl:variable name="location">, <xsl:value-of select="location_name"/></xsl:variable>
<xsl:variable name="city">, <xsl:value-of select="city_name"/></xsl:variable>
<xsl:variable name="city_area">, <xsl:value-of select="city_area_name"/></xsl:variable>
<p>Адрес доставки:
<xsl:value-of select="$country"/>
<xsl:value-of select="$location"/>
<xsl:value-of select="$city"/>
<xsl:value-of select="$city_area"/> <xsl:value-of select="address"/></p>
<p>Индекс: <xsl:value-of select="index"/></p>
<xsl:if test="phone!=''">
<p>Телефон: <xsl:value-of select="phone"/></p>
</xsl:if>
</xsl:template>
<!-- Данные о товарах -->
<xsl:template match="items_order">
<xsl:variable name="quantity"><xsl:value-of select="order_items_quantity"/></xsl:variable>
<xsl:variable name="price"><xsl:value-of select="order_items_price"/></xsl:variable>
<tr class="shop_cart_table">
<td>
<xsl:choose>
<xsl:when test="item/path != ''">
<a href="http://{//order_list/shop/site_alias_name}{//order_list/shop/shop_path}{item/fullpath}{item/path}/"><xsl:value-of select="order_items_name"/></a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="order_items_name"/>
</xsl:otherwise>
</xsl:choose>
</td>
<td><xsl:value-of select="$quantity"/> <xsl:value-of select="item/mesure"/></td>
<td><xsl:value-of select="$price"/> <xsl:value-of select="//order_list/currency/currency_name"/></td>
<td><xsl:value-of select="$quantity*$price"/> <xsl:value-of select="//order_list/currency/currency_name"/></td>
</tr>
</xsl:template>
</xsl:stylesheet>
ОплатаБезналичнаяОтЮрЛица
<?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" encoding="Windows-1251" indent="yes" method="html" omit-xml-declaration="no" version="1.0" />
<!-- Шаблон "ОплатаБезналичнаяОтЮрЛица" -->
<xsl:template match="/document_list">
<h1>Ваш заказ оформлен</h1>
<xsl:apply-templates select="order_list"/>
<h2>Заказанные товары</h2>
<table cellpadding="2" cellspacing="0">
<tr class="shop_cart_table">
<td>Наименование</td>
<td>Количество</td>
<td>Цена</td>
<td>Сумма</td>
</tr>
<xsl:apply-templates select="items_order"/>
<tr class="shop_cart_table">
<td colspan="4" align="right">
Итого: <xsl:value-of select="order_list/sum"/> <xsl:value-of select="order_list/currency/currency_name"/>
</td>
</tr>
</table>
<p>Распечатайте <a href="{/document_list/print_link}" target="_blank">бланк счета</a> и передайте его в бухгалтерию.</p>
<p>Через некоторое время с Вами свяжется наш менеджер, чтобы согласовать заказанный товар и время доставки.</p>
<p>Спасибо за использование услуг нашего магазина.</p>
</xsl:template>
<!-- Шаблон вывода данных о заказе -->
<xsl:template match="order_list">
<h2>Данные доставки</h2>
<p>ФИО: <xsl:value-of select="site_user_fio"/></p>
<p>E-mail: <xsl:value-of select="site_users_email"/></p>
<p>Телефон: <xsl:value-of select="site_users_phone"/></p>
<p>Факс: <xsl:value-of select="site_users_fax"/></p>
<xsl:variable name="country" select="country_name"/>
<xsl:variable name="location">, <xsl:value-of select="location_name"/></xsl:variable>
<xsl:variable name="city">, <xsl:value-of select="city_name"/></xsl:variable>
<xsl:variable name="city_area">, <xsl:value-of select="city_area_name"/></xsl:variable>
<p>Адрес доставки:
<xsl:value-of select="$country"/>
<xsl:value-of select="$location"/>
<xsl:value-of select="$city"/>
<xsl:value-of select="$city_area"/> <xsl:value-of select="address"/></p>
<p>Индекс: <xsl:value-of select="index"/></p>
<xsl:if test="phone!=''">
<p>Телефон: <xsl:value-of select="phone"/></p>
</xsl:if>
</xsl:template>
<!-- Данные о товарах -->
<xsl:template match="items_order">
<xsl:variable name="quantity"><xsl:value-of select="order_items_quantity"/></xsl:variable>
<xsl:variable name="price"><xsl:value-of select="order_items_price"/></xsl:variable>
<tr class="shop_cart_table">
<td>
<xsl:choose>
<xsl:when test="item/path != ''">
<a href="http://{//order_list/shop/site_alias_name}{//order_list/shop/shop_path}{item/fullpath}{item/path}/"><xsl:value-of select="order_items_name"/></a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="order_items_name"/>
</xsl:otherwise>
</xsl:choose>
</td>
<td><xsl:value-of select="$quantity"/> <xsl:value-of select="item/mesure"/></td>
<td><xsl:value-of select="$price"/> <xsl:value-of select="//order_list/currency/currency_name"/></td>
<td><xsl:value-of select="$quantity*$price"/> <xsl:value-of select="//order_list/currency/currency_name"/></td>
</tr>
</xsl:template>
</xsl:stylesheet>