Ignore:
Timestamp:
2012/01/17 16:32:25 (12 years ago)
Author:
Seasoft
Message:

2.12系へマイルストーン変更となったチケット分を差し戻し
r21326 #1536
r21325 #1528
r21324 #1547,#1546
r21323 #1546
r21322 #1543
r21321 #1536
r21320 #1536
r21319 #1544
r21318 #1521,#1522
r21317 #1431

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_11-dev/data/class/pages/products/LC_Page_Products_List.php

    r21400 r21410  
    311311        $arrProducts = $objProduct->getListByProductIds($objQuery, $arrProductId); 
    312312 
     313        //取得している並び順で並び替え 
     314        $arrProducts2 = array(); 
     315        foreach($arrProducts as $item) { 
     316            $arrProducts2[ $item['product_id'] ] = $item; 
     317        } 
     318        $arrProducts = array(); 
     319        foreach($arrProductId as $product_id) { 
     320            $arrProducts[] = $arrProducts2[$product_id]; 
     321        } 
     322 
    313323        // 規格を設定 
    314324        $objProduct->setProductsClassByProductIds($arrProductId); 
     
    373383        $objQuery   =& SC_Query_Ex::getSingletonInstance(); 
    374384        $arrSearch  = array('category' => '指定なし', 'maker' => '指定なし', 'name' => '指定なし'); 
    375         // カテゴリ検索条件 
     385        // カテゴリ検索条件 
    376386        if ($arrSearchData['category_id'] > 0) { 
    377387            $arrSearch['category']  = $objQuery->get('category_name', 'dtb_category', 'category_id = ?', array($arrSearchData['category_id'])); 
     
    398408        // 検索結果対象となる商品の数を取得 
    399409        $objQuery   =& SC_Query_Ex::getSingletonInstance(); 
    400         $objQuery->setWhere($searchCondition['where_for_count']); 
     410        $objQuery->setWhere($searchCondition['where']); 
    401411        $objProduct = new SC_Product_Ex(); 
    402412        return $objProduct->findProductCount($objQuery, $searchCondition['arrval']); 
     
    423433        // 商品検索条件の作成(未削除、表示) 
    424434        $searchCondition['where'] = "alldtl.del_flg = 0 AND alldtl.status = 1 "; 
     435 
     436        // 在庫無し商品の非表示 
     437        if (NOSTOCK_HIDDEN === true) { 
     438            $searchCondition['where'] .= ' AND (stock >= 1 OR stock_unlimited = 1)'; 
     439        } 
    425440 
    426441        if (strlen($searchCondition["where_category"]) >= 1) { 
     
    450465            $searchCondition['arrval'][] = $arrSearchData['maker_id']; 
    451466        } 
    452  
    453         $searchCondition['where_for_count'] = $searchCondition['where']; 
    454  
    455         // 在庫無し商品の非表示 
    456         if (NOSTOCK_HIDDEN) { 
    457             $searchCondition['where'] .= ' AND (stock >= 1 OR stock_unlimited = 1)'; 
    458             $searchCondition['where_for_count'] .= ' AND EXISTS(SELECT * FROM dtb_products_class WHERE product_id = alldtl.product_id AND del_flg = 0 AND (stock >= 1 OR stock_unlimited = 1))'; 
    459         } 
    460  
    461467        return $searchCondition; 
    462468    } 
Note: See TracChangeset for help on using the changeset viewer.