当前位置: 首页>>代码示例>>PHP>>正文


PHP products_minierp::killProduct方法代码示例

本文整理汇总了PHP中products_minierp::killProduct方法的典型用法代码示例。如果您正苦于以下问题:PHP products_minierp::killProduct方法的具体用法?PHP products_minierp::killProduct怎么用?PHP products_minierp::killProduct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在products_minierp的用法示例。


在下文中一共展示了products_minierp::killProduct方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

 $killed = array();
 $logger->write('Total products to check: ' . count($products));
 foreach ($products as $pid => $date_added) {
     //SET INACTIVE FOR DTK ARTICLES WHICH HAVE NO DEPOT STOCK
     $products_articles = $class_pa->retrieveList($pid);
     foreach ($products_articles as $pa) {
         $stock_article = $class_pm->stockRetrieve(WAREHOUSE_ID_PRODUCTS_HAMBURG, $pid, $pa['products_articles_id']);
         if ($stock_article == 0) {
             $class_pa->setActiveStatus($pa['products_articles_id'], 0);
         }
     }
     $stock = $class_pm->stockRetrieve(WAREHOUSE_ID_PRODUCTS_HAMBURG, $pid, '*');
     if ($stock == 0) {
         //KILL PRODUCT AND REMOVE IT FROM DTK COLLECTION
         $username = 'auto-set';
         $class_pm->killProduct($pid, $username);
         $class_s->remProduct($style_id, $pid, $username);
         $killed[] = $pid;
     }
 }
 $killed_total = count($killed);
 //Notify Design and IT Team
 if ($killed_total > 0 || date('N') == 7) {
     $subject = 'Auto Kill DTK Collection (' . $killed_total . ')';
     $send_message = '<div>' . $killed_total . ' Product' . ($killed_total > 1 ? 's are' : ' is') . ' auto killed today from DTK collection</div>';
     if ($killed_total > 0) {
         foreach ($killed as $pid_killed) {
             $product = $class_pm->retrieveDetail($pid_killed, 'p');
             $image = webImage($product['p']['products_image'], IMAGE_SIZE_THUMBNAIL_1, IMAGE_SIZE_THUMBNAIL_1);
             $send_message .= '<div style="float:left;margin-right:15px;">' . '<div>' . $image . '</div><div style="text-align:center;">' . $pid_killed . '</div></div>';
         }
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:daily-cleaner.php

示例2: killBrand

 /**
  * Set brand status as deleted and kill all active products of the brand
  * @param Int $brand_id Brand ID to delete
  * @param String $username Username trigger the function
  * @param Boolean $use_echo When set to true will echo "." dot during the looping of products killing
  */
 function killBrand($brand_id, $username, $use_echo = false)
 {
     use_class('products_minierp');
     $class_pm = new products_minierp();
     $q = tep_db_query("SELECT products_id FROM products WHERE products_brand_id={$brand_id} AND active_status='1'");
     while ($row = tep_db_fetch_array($q)) {
         if ($use_echo) {
             echo '. ';
         }
         $class_pm->killProduct($row['products_id'], $username);
     }
     $this->delete($brand_id);
 }
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:19,代码来源:products_brand.php

示例3: isset

<?php

//SUBMIT ACTION
if (isset($_POST['me_action'])) {
    if ($_POST['me_action'] == 'KILLPRODUCT') {
        $products_id = tep_db_prepare_input($_POST['products_id']);
        use_class('products_minierp');
        $class_pm = new products_minierp();
        $class_pm->killProduct($products_id, $session_userinfo['username']);
        echo utf8_encode($products_id);
        exit;
    }
}
if (isset($_POST['keyword']) && $_POST['keyword'] != '') {
    $keyword_raw = tep_db_prepare_input($_POST['keyword']);
} else {
    $keyword_raw = '';
}
$search_by = isset($_POST['search_by']) ? $_POST['search_by'] : 'elementused';
$productnamechecked = $search_by == 'productname' ? 'selected="selected"' : '';
$elementusedchecked = $search_by == 'elementused' ? 'selected="selected"' : '';
$searchbyeanchecked = $search_by == 'searchbyean' ? 'selected="selected"' : '';
$products_query = "SELECT p.products_image, p.products_status, p.`products_id`, p.`products_model`, p.active_status";
$products_query .= " , pd.`products_name`, pr.status AS kill_status";
$products_query .= " FROM products p";
$products_query .= " LEFT JOIN products_removed pr ON pr.products_id=p.products_id";
$products_query .= " LEFT JOIN products_description pd on pd.products_id = p.products_id AND pd.language_id=2";
$join_query = '';
$filter_query = '';
if ($keyword_raw != '' && $search_by == 'productname') {
    $keywords = explode(' ', $keyword_raw);
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:products-search.php


注:本文中的products_minierp::killProduct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。