本文整理汇总了PHP中products_minierp::setTBStatus方法的典型用法代码示例。如果您正苦于以下问题:PHP products_minierp::setTBStatus方法的具体用法?PHP products_minierp::setTBStatus怎么用?PHP products_minierp::setTBStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类products_minierp
的用法示例。
在下文中一共展示了products_minierp::setTBStatus方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tradebyte
//SEND XML TO TRADEBYTE SERVER VIA FTP SSL
use_class('tradebyte');
$tb = new tradebyte();
$tb->connect();
//$tb->connect('NONSSL');
$target_filename = TRADEBYTE_FTP_IN_PATH . $xml_file;
$success_upload = false;
if ($tb->send($xml_filename, $target_filename)) {
rename($xml_filename, TRADEBYTE_ARCHIVE_CAT_PATH . $xml_file);
$success_upload = true;
}
$tb->disconnect();
if ($success_upload) {
//SET family_locked FOR ALREADY UPLOADED PRODUCTS TO TB
$class_pm->updateFlagFamilyLocked($products_uploaded, 1);
$class_pm->setTBStatus($products_uploaded, 1);
if (count($images_uploaded) > 0) {
$class_jc->updateImageUploadStatus($tb_sp_ids, $images_uploaded, '1');
}
$class_jc->updatePriceUploadStatus($tb_sp_ids, $products_uploaded, '1');
//Set all catalog for each jng_sp_id (related to the upload)
//last_active_status = 1/0 to trigger the active age counting.
if (count($last_active_status_need_update) > 0) {
$all_cats = implode(',', $last_active_status_need_update);
$filter_las = "jng_sp_catalog_id IN ({$all_cats})";
$class_jc->updateLastActiveStatus(null, $filter_las);
}
$messages['s'] = "<h3>{$total_family_uploaded} of {$total_family}" . " Family are uploaded to TB</h3>" . "<h3>{$total_products_uploaded} products are uploaded to TB</h3>";
} else {
$messages['e'] = '<h3>Failed uploading xml cat to TB Server</h3><br/>';
unlink($xml_filename);
示例2: setTradebyteNeedReupload
/**
* Set flag tb_status as need reupload to tradebyte (3)
* @param int or array $products_id
*/
function setTradebyteNeedReupload($products_id)
{
use_class('products_minierp');
$class_pm = new products_minierp();
$class_pm->setTBStatus($products_id, 3, "tb_status = 1");
}
示例3: setTradebyteNeedReupload
if ($catalog['active_status'] != '0') {
$class_jc->deactivateProduct($catalog['jng_sp_catalog_id']);
if ($catalog['last_active_status'] == '1') {
$update_tb_status = true;
}
}
}
}
//Update TB Status if needed
if ($update_tb_status) {
$q = "SELECT tb_status FROM products WHERE products_id='{$pid}'";
$r = tep_db_query($q);
$row = tep_db_fetch_array($r);
if ($row['tb_status'] == '0') {
//Set for first upload
$class_pm->setTBStatus($pid, 2);
} else {
//Set for need reupload
setTradebyteNeedReupload($pid);
}
}
} elseif ($_POST['me_action'] == 'UPDATEFLAGIMAGEIMPROVED') {
$status = tep_db_prepare_input($_POST['status']);
$class_pm->updateFlagImageImproved($pid, $status);
echo 'OK';
exit;
} elseif ($_POST['me_action'] == 'MAKESHAREABLE') {
tep_db_query("UPDATE products_configurator SET visible_status='A', allow_modification='1' WHERE products_id={$pid}");
$messagebox->add("This Product is now shareable.", 'green');
} elseif ($_POST['me_action'] == 'MAKENOTSHAREABLE') {
tep_db_query("UPDATE products_configurator SET visible_status='N', allow_modification='0' WHERE products_id={$pid}");