Beispiel #1
0
    } elseif ($mode == 'file') {
        if (RusEximCommerceml::createImportFile($filename) === false) {
            fn_echo("failure");
            exit;
        }
        fn_echo("success\n");
    } elseif ($mode == 'import') {
        $fileinfo = pathinfo($filename);
        $xml = RusEximCommerceml::getFileCommerceml($filename);
        if ($xml === false) {
            fn_echo("failure");
            exit;
        }
        if (strpos($fileinfo['filename'], 'import') !== false) {
            if ($s_commerceml['exim_1c_import_products'] != 'not_import') {
                RusEximCommerceml::importDataProductFile($xml, $user_data, $service_exchange, $lang_code);
            }
        }
        if (strpos($fileinfo['filename'], 'offers') !== false) {
            if ($s_commerceml['exim_1c_only_import_offers'] == 'Y') {
                RusEximCommerceml::importDataOffersFile($xml, $service_exchange, $lang_code);
            }
        }
        fn_echo("success\n");
    }
} elseif ($type == 'sale' && $user_data['user_type'] != 'V' && $s_commerceml['exim_1c_check_prices'] != 'Y') {
    if ($mode == 'checkauth') {
        RusEximCommerceml::exportDataCheckauth();
    } elseif ($mode == 'init') {
        RusEximCommerceml::exportDataInit();
    } elseif ($mode == 'file') {