Добрый день.
Необходимо в письмо администратору о заказе внести изменения. Для этого нужно передать в хмл данные о всех группах магазина. Но что то у меня не получается совсем. Делаю так (мое добавление выделено жирным)
/* Формируем XML */
$xmlData = '<?xml version="1.0" encoding="'.SITE_CODING.'"?>'."\n";
$xmlData .= '<document_list>'."\n";
/* Ссылака на версию для печати */
$shop_row = $shop->GetShop($shop_id);
if ($shop_row)
{
/* Получаем путь к магазину */
$Structure = & singleton('Structure');
$shop_path = "/".$Structure->GetStructurePath($shop_row['structure_id'], 0);
$shop_path .= "cart/print/{$order_row['shop_order_guid']}/";
$xmlData .= "<print_link>".$shop_path."</print_link>";
}
$xmlData .= $shop->GetXmlForOrder($order_id, false, true);
$xmlData .= $shop->GetXmlForItemsOrder($order_id);
$xmlData .= $shop->GetGroups($shop_id);
$xmlData .= '</document_list>'."\n";
$xsl = new xsl();
echo $xsl->build($xmlData, 'ОплатаПриПолучении');
if ($_SESSION['last_order_id'] == 0)
{
$structure = & singleton('Structure');
$structure_row = $structure->GetStructureItem(to_int($shop_row['structure_id']));
$lib = new lib();
$LA = $lib->LoadLibPropertiesValue(to_int($structure_row['lib_id']), to_int($structure_row['structure_id']));
$date_str = date("d.m.Y H:i:s");
if (trim(to_str($order_row['shop_order_account_number'])) != '')
{
$shop_order_account_number = trim(to_str($order_row['shop_order_account_number']));
}
else
{
$shop_order_account_number = $order_id;
}
/* Отправляем письмо заказчику */
$shop->SendMailAboutOrder($shop_id,
$order_id,
$site_users_id,
to_str($LA['xsl_letter_to_admin']),
to_str($LA['xsl_letter_to_user']),
$order_row['shop_order_users_email'],
array('admin-content-type' => 'html',
'user-content-type' => 'html',
'admin-subject' => sprintf($GLOBALS['MSG_shops']['shop_order_admin_subject'], $shop_order_account_number, $shop_row['shop_shops_name'], $date_str),
'user-subject' => sprintf($GLOBALS['MSG_shops']['shop_order_user_subject'], $shop_order_account_number, $shop_row['shop_shops_name'], $date_str),
'attach_eitem_file' => 0,
'email_from_admin' => $order_row['shop_order_users_email']));
}
Что я делаю не так? Как же добавить группы магазина в этот хмл?