本文整理汇总了PHP中products_minierp::stockUpdateTBNeedUpdateStatus方法的典型用法代码示例。如果您正苦于以下问题:PHP products_minierp::stockUpdateTBNeedUpdateStatus方法的具体用法?PHP products_minierp::stockUpdateTBNeedUpdateStatus怎么用?PHP products_minierp::stockUpdateTBNeedUpdateStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类products_minierp
的用法示例。
在下文中一共展示了products_minierp::stockUpdateTBNeedUpdateStatus方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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';
示例2: updateStatusPrice
function updateStatusPrice($products_id, $status, $jng_sp_id, $filter = '')
{
$type = strtolower($type);
if ($filter != '') {
$filter = " AND {$filter}";
}
if (is_array($products_id)) {
$products_id = implode(',', $products_id);
}
$sda = array();
$sda['status_price'] = $status;
if ($jng_sp_id == '0') {
tep_db_perform('products', $sda, 'update', "(products_id IN ({$products_id}) {$filter})");
} elseif ($jng_sp_id > 0) {
use_class('jng_sp');
$class_sp = new jng_sp();
$sptb = $class_sp->retrieveList('tb_used=1');
$sp_on_tb = in_array($jng_sp_id, array_keys($sptb));
if (!$sp_on_tb) {
$sda['image_uploaded'] = '0';
}
tep_db_perform('jng_sp_catalog', $sda, 'update', "(products_id IN ({$products_id}) AND jng_sp_id = {$jng_sp_id} {$filter})");
if ($sp_on_tb) {
use_class('products_minierp');
$class_pm = new products_minierp();
$class_pm->stockUpdateTBNeedUpdateStatus(WAREHOUSE_ID_PRODUCTS_HAMBURG, $products_id, '1');
}
}
}