- Timestamp:
- 2012/01/17 16:32:25 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_11-dev/data/class/pages/products/LC_Page_Products_List.php
r21400 r21410 311 311 $arrProducts = $objProduct->getListByProductIds($objQuery, $arrProductId); 312 312 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 313 323 // 規格を設定 314 324 $objProduct->setProductsClassByProductIds($arrProductId); … … 373 383 $objQuery =& SC_Query_Ex::getSingletonInstance(); 374 384 $arrSearch = array('category' => '指定なし', 'maker' => '指定なし', 'name' => '指定なし'); 375 // カテゴリ 検索条件385 // カテゴリー検索条件 376 386 if ($arrSearchData['category_id'] > 0) { 377 387 $arrSearch['category'] = $objQuery->get('category_name', 'dtb_category', 'category_id = ?', array($arrSearchData['category_id'])); … … 398 408 // 検索結果対象となる商品の数を取得 399 409 $objQuery =& SC_Query_Ex::getSingletonInstance(); 400 $objQuery->setWhere($searchCondition['where _for_count']);410 $objQuery->setWhere($searchCondition['where']); 401 411 $objProduct = new SC_Product_Ex(); 402 412 return $objProduct->findProductCount($objQuery, $searchCondition['arrval']); … … 423 433 // 商品検索条件の作成(未削除、表示) 424 434 $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 } 425 440 426 441 if (strlen($searchCondition["where_category"]) >= 1) { … … 450 465 $searchCondition['arrval'][] = $arrSearchData['maker_id']; 451 466 } 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 461 467 return $searchCondition; 462 468 }
Note: See TracChangeset
for help on using the changeset viewer.