本文整理汇总了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';