Changeset 17289


Ignore:
Timestamp:
2008/04/25 17:39:16 (16 years ago)
Author:
pineray
Message:

キャンペーン管理の商品設定でカテゴリを指定すると検索できない不具合を修正

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/comu-ver2/data/class/pages/admin/contents/LC_Page_Admin_Contents_CampaignCreateTag.php

    r16582 r17289  
    8787                    break; 
    8888                case 'search_category_id': 
    89                     // 子カテゴリIDの取得 
    90                     $arrRet = $objDb->sfGetChildsID("dtb_category", "parent_category_id", "category_id", $val); 
    91                     $tmp_where = ""; 
    92                     foreach ($arrRet as $val) { 
    93                         if($tmp_where == "") { 
    94                             $tmp_where.= " AND ( category_id = ?"; 
    95                         } else { 
    96                             $tmp_where.= " OR category_id = ?"; 
    97                         } 
    98                         $arrval[] = $val; 
     89                     list($tmp_where, $tmp_arrval) = $objDb->sfGetCatWhere($val); 
     90                    if($tmp_where != "") { 
     91                        $where.= " AND product_id IN (SELECT product_id FROM dtb_product_categories WHERE " . $tmp_where . ")"; 
     92                        $arrval = array_merge((array)$arrval, (array)$tmp_arrval); 
    9993                    } 
    100                     $where.= $tmp_where . " )"; 
    10194                    break; 
    10295                case 'search_product_id': 
    103                     if($val != "") { 
    104                         $where .= " AND product_id = ?"; 
    105                         if(!SC_Utils_Ex::sfIsInt($val)) $val = 0; 
    106                         $arrval[] = $val; 
    107                     } 
     96                    $where .= " AND product_id IN (SELECT product_id FROM dtb_products_class WHERE product_code LIKE ? GROUP BY product_id)"; 
     97                    $arrval[] = "$val%"; 
    10898                    break; 
    10999                default: 
Note: See TracChangeset for help on using the changeset viewer.