В statistic_functions.php в функции stChangeOrderStatus, в самом ее начале вставляем :
if ($statusID == 5) { $order_item = db_query( "SELECT s.itemID, s.name, d.productID, t.filename FROM ".DB_PRFX."ordered_carts AS s LEFT JOIN ".DB_PRFX."shopping_cart_items AS d USING (itemID) LEFT JOIN ".DB_PRFX."product_pictures AS t USING (productID) WHERE orderID=".(int)$orderID); while ($row = db_fetch_assoc($order_item)) $item[] = $row; }
В ней же, в функции отправки письма xMailTxt, например, после строки :
'customer_firstname' => $FirstName,
вставляем :
'item' => $item,
В customer.order.change_status.tpl после строки :
{$_MSG_CHANGE_ORDER_STATUS}
вставляем :
{if $item} <br><br> <hr> <div align="center"><b>Пожалуйста, напишите отзыв о заказанных Вами товарах.</b></div><br><br> <table> {section name=i loop=$item} <tr> <td><a href="http://{$smarty.const.CONF_SHOP_URL}/product_{$item[i].productID}.html"><img src="http://{$smarty.const.CONF_SHOP_URL}/data/small/{$item[i].filename}"></a></td> <td><a href="http://{$smarty.const.CONF_SHOP_URL}/product_{$item[i].productID}.html">{$item[i].name}</a> <br><br> <a href="http://{$smarty.const.CONF_SHOP_URL}/index.php?productID={$item[i].productID}&discuss=yes"><b>Написать отзыв</b></a></td> </tr> {/section} </table> {/if}