Файл: mg-core/lib/yml.php
Строк: 48
<?php
/**
* Класс для экспорта товаров из каталога сайта на Yandex.Market.
*
* @author Авдеев Марк <mark-avdeev@mail.ru>
* @package moguta.cms
* @subpackage Libraries
*/
class YML {
public function __construct() {
}
/**
* Выгружает содержание всего каталога в CSV файл
* @return array
*/
public function exportToYml() {
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream;");
header("Content-Type: application/download");
header("Content-Disposition: attachment;filename=data.xml");
header("Content-Transfer-Encoding: binary ");
$currencyShopIso = MG::getSetting('currencyShopIso');
$currencyRate = MG::getSetting('currencyRate');
$currencyRate = $currencyRate[$currencyShopIso];
$nXML = '<?xml version="1.0" encoding="windows-1251"?>
<!DOCTYPE yml_catalog SYSTEM "shops.dtd">';
echo mb_convert_encoding($nXML, "WINDOWS-1251", "UTF-8");
exit;
}
}