Ignore:
Timestamp:
2008/04/07 13:29:15 (18 years ago)
Author:
satou
Message:

fixed by pineray (merge r17190:r17191)

Location:
branches/version-2/data/class/pages/admin/products
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2/data/class/pages/admin/products/LC_Page_Admin_Products.php

    r17202 r17226  
    312312                    // 検索結果の取得 
    313313                    $this->arrProducts = $objQuery->select($col, $from, $where, $arrval); 
     314 
     315                    // 各商品ごとのカテゴリIDを取得 
     316                    if (count($this->arrProducts) > 0) { 
     317                        foreach ($this->arrProducts as $key => $val) { 
     318                            $this->arrProducts[$key]["categories"] = $objDb->sfGetCategoryId($val["product_id"]); 
     319                            $objDb->g_category_on = false; 
     320                        } 
     321                    } 
    314322                } 
    315323            } 
  • branches/version-2/data/class/pages/admin/products/LC_Page_Admin_Products_Category.php

    r17207 r17226  
    126126            } 
    127127            // 登録商品のチェック 
    128             $where = "category_id = ? AND del_flg = 0"; 
    129             $count = $objQuery->count("dtb_products", $where, array($_POST['category_id'])); 
     128            $table = "dtb_product_categories AS T1 LEFT JOIN dtb_products AS T2 ON T1.product_id = T2.product_id"; 
     129            $where = "T1.category_id = ? AND T2.del_flg = 0"; 
     130            $count = $objQuery->count($table, $where, array($_POST['category_id'])); 
    130131            if($count != 0) { 
    131132                $this->arrErr['category_name'] = "※ カテゴリ内に商品が存在するため削除できません。<br>"; 
Note: See TracChangeset for help on using the changeset viewer.