Changeset 21328


Ignore:
Timestamp:
2011/11/11 00:18:04 (9 years ago)
Author:
Seasoft
Message:

#1545 (SC_Product#alldtlSQL dtb_products_class.del_flg = 0 を常に付加する)

Location:
branches/version-2_11-dev/data/class
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_11-dev/data/class/SC_Product.php

    r21325 r21328  
    165165            ,update_date 
    166166__EOS__; 
    167         $where = 'dtb_products_class.del_flg = 0'; 
    168         $res = $objQuery->select($col, $this->alldtlSQL($where)); 
     167        $res = $objQuery->select($col, $this->alldtlSQL()); 
    169168        return $res; 
    170169    } 
     
    204203        if (strlen($objQuery->order) === 0) { 
    205204            $arrTmp = array(); 
    206             foreach($arrProductId as $product_id) { 
     205        foreach($arrProductId as $product_id) { 
    207206                $arrTmp[$product_id] = $arrProducts[$product_id]; 
    208207            } 
     
    222221    function getDetail($productId) { 
    223222        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    224         $result = $objQuery->select("*", $this->alldtlSQL("product_id = ? AND del_flg = 0"), 
     223        $result = $objQuery->select("*", $this->alldtlSQL('product_id = ?'), 
    225224                                    "product_id = ?", 
    226225                                    array($productId, $productId)); 
     
    689688        $where_clause = ''; 
    690689        if (!SC_Utils_Ex::isBlank($where_products_class)) { 
    691             $where_clause = 'WHERE ' . $where_products_class; 
     690            $where_products_class = 'AND (' . $where_products_class . ')'; 
    692691        } 
    693692        /* 
     
    774773                              COUNT(*) as class_count 
    775774                        FROM dtb_products_class 
    776                         $where_clause 
     775                        WHERE del_flg = 0 $where_products_class 
    777776                        GROUP BY product_id 
    778777                    ) AS T4 
  • branches/version-2_11-dev/data/class/helper/SC_Helper_DB.php

    r21324 r21328  
    657657        // 在庫無し商品の非表示 
    658658        if (NOSTOCK_HIDDEN) { 
    659             $sql_where_dtl = '(stock >= 1 OR stock_unlimited = 1)'; 
    660             $from = $objProduct->alldtlSQL($sql_where_dtl); 
     659            $where_products_class = '(stock >= 1 OR stock_unlimited = 1)'; 
     660            $from = $objProduct->alldtlSQL($where_products_class); 
    661661        }else{ 
    662662            $from = 'dtb_products as alldtl'; 
  • branches/version-2_11-dev/data/class/pages/admin/products/LC_Page_Admin_Products.php

    r21229 r21328  
    383383        // 読み込む列とテーブルの指定 
    384384        $col = "product_id, name, main_list_image, status, product_code_min, product_code_max, price02_min, price02_max, stock_min, stock_max, stock_unlimited_min, stock_unlimited_max, update_date"; 
    385         $from = $objProduct->alldtlSQL('del_flg = 0'); 
     385        $from = $objProduct->alldtlSQL(); 
    386386 
    387387        $objQuery->setLimitOffset($limit, $offset); 
Note: See TracChangeset for help on using the changeset viewer.