- Timestamp:
- 2011/09/25 13:15:51 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_11-dev/data/class/pages/products/LC_Page_Products_Detail.php
r21230 r21256 409 409 /* 登録済み関連商品の読み込み */ 410 410 function lfPreGetRecommendProducts($product_id) { 411 $ arrRecommend = array();411 $objProduct = new SC_Product_Ex(); 412 412 $objQuery =& SC_Query_Ex::getSingletonInstance(); 413 413 414 $objQuery->setOrder("rank DESC"); 414 415 $arrRecommendData = $objQuery->select("recommend_product_id, comment", "dtb_recommend_products", "product_id = ?", array($product_id)); … … 420 421 } 421 422 422 $objProduct = new SC_Product_Ex();423 424 $where = "";425 if (!empty($arrRecommendProductId)) {426 $where = 'product_id IN (' . implode(',', $arrRecommendProductId) . ')';427 } else {428 return $arrRecommend;429 }430 423 $objQuery =& SC_Query_Ex::getSingletonInstance(); 431 $objQuery->setWhere($where); 432 $arrProducts = $objProduct->lists($objQuery, $arrRecommendProductId); 424 $arrProducts = $objProduct->getListByProductIds($objQuery, $arrRecommendProductId); 433 425 434 426 //取得している並び順で並び替え … … 438 430 $arrProducts2[ $item['product_id'] ] = $item; 439 431 } 440 $arrProducts = array(); 432 433 $arrRecommend = array(); 441 434 foreach($arrRecommendProductId as $product_id) { 442 435 $arrProducts2[$product_id]['comment'] = $arrRecommendData[$product_id];
Note: See TracChangeset
for help on using the changeset viewer.