Changeset 21326
- Timestamp:
- 2011/11/11 00:02:56 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_11-dev/data/class/pages/products/LC_Page_Products_List.php
r21325 r21326 398 398 // 検索結果対象となる商品の数を取得 399 399 $objQuery =& SC_Query_Ex::getSingletonInstance(); 400 $objQuery->setWhere($searchCondition['where ']);400 $objQuery->setWhere($searchCondition['where_for_count']); 401 401 $objProduct = new SC_Product_Ex(); 402 402 return $objProduct->findProductCount($objQuery, $searchCondition['arrval']); … … 423 423 // 商品検索条件の作成(未削除、表示) 424 424 $searchCondition['where'] = "alldtl.del_flg = 0 AND alldtl.status = 1 "; 425 426 // 在庫無し商品の非表示427 if (NOSTOCK_HIDDEN) {428 $searchCondition['where'] .= ' AND (stock >= 1 OR stock_unlimited = 1)';429 }430 425 431 426 if (strlen($searchCondition["where_category"]) >= 1) { … … 455 450 $searchCondition['arrval'][] = $arrSearchData['maker_id']; 456 451 } 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 457 461 return $searchCondition; 458 462 }
Note: See TracChangeset
for help on using the changeset viewer.