本文整理匯總了PHP中products_minierp::stockResetTBNeedUpdateStatus方法的典型用法代碼示例。如果您正苦於以下問題:PHP products_minierp::stockResetTBNeedUpdateStatus方法的具體用法?PHP products_minierp::stockResetTBNeedUpdateStatus怎麽用?PHP products_minierp::stockResetTBNeedUpdateStatus使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類products_minierp
的用法示例。
在下文中一共展示了products_minierp::stockResetTBNeedUpdateStatus方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: date
$timestamp = date('Ymd_His');
//$xml_file = "TBCAT_$timestamp.TEST.xml";
$xml_file = "TBCAT_{$timestamp}.xml";
$xml_filename = TRADEBYTE_UPLOAD_CAT_PATH . $xml_file;
$xmlt->setOutputVars($xml_filename);
$xmlt->printOutput('F');
//echo $xmlt->printOutput();
$logger->write("PRI xml {$xml_file} created successfully");
//SEND XML TO TRADEBYTE SERVER VIA FTP SSL
use_class('tradebyte');
$tb = new tradebyte();
$tb->connect();
$success_upload = false;
if ($tb->send($xml_filename, TRADEBYTE_FTP_IN_PATH . $xml_file)) {
rename($xml_filename, TRADEBYTE_ARCHIVE_PRI_PATH . $xml_file);
$success_upload = true;
}
$tb->disconnect();
if ($success_upload) {
$new_status = 0;
$class_pm->stockUpdateTBNeedUpdateStatus(WAREHOUSE_ID_PRODUCTS_HAMBURG, $reported_products, $new_status);
$class_pm->stockResetTBNeedUpdateStatus();
$logger->write("Successfully sent to TB");
} else {
$logger->write("Problem found when sending to TB");
}
} else {
$logger->write("There are no stock update to report!");
}
$logger->close();
echo 'Done';