Changeset 22507 for branches/version-2_12-dev
- Timestamp:
- 2013/02/06 20:32:57 (11 years ago)
- Location:
- branches/version-2_12-dev/data/class
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/SC_Product.php
r22486 r22507 74 74 */ 75 75 function findProductIdsOrder(&$objQuery, $arrVal = array()) { 76 $table = <<< __EOS__ 77 dtb_products AS alldtl 78 __EOS__; 76 $table = 'dtb_products AS alldtl'; 77 79 78 $objQuery->setGroupBy('alldtl.product_id'); 80 79 if (is_array($this->arrOrderData) and $objQuery->order == '') { … … 94 93 $objQuery->setOrder($order); 95 94 } 96 $results = $objQuery->select('alldtl.product_id', $table, '', $arrVal, MDB2_FETCHMODE_ORDERED); 97 $resultValues = array(); 98 foreach ($results as $val) { 99 $resultValues[] = $val[0]; 100 } 101 return $resultValues; 95 $arrReturn = $objQuery->getCol('alldtl.product_id', $table, '', $arrVal); 96 97 return $arrReturn; 102 98 } 103 99 … … 112 108 */ 113 109 function findProductCount(&$objQuery, $arrVal = array()) { 114 $table = <<< __EOS__ 115 dtb_products AS alldtl 116 __EOS__; 110 $table = 'dtb_products AS alldtl'; 111 117 112 return $objQuery->count($table, '', $arrVal); 118 113 } … … 154 149 __EOS__; 155 150 $res = $objQuery->select($col, $this->alldtlSQL()); 151 156 152 return $res; 157 153 } … … 232 228 $result = $this->getProductsClass($productClassId); 233 229 $result = array_merge($result, $this->getDetail($result['product_id'])); 230 234 231 return $result; 235 232 } … … 404 401 $objQuery->setWhere('product_class_id = ? AND T1.del_flg = 0'); 405 402 $arrRes = $this->getProductsClassByQuery($objQuery, $productClassId); 403 406 404 return (array)$arrRes[0]; 407 405 } … … 424 422 } 425 423 $objQuery->setWhere($where); 424 426 425 return $this->getProductsClassByQuery($objQuery, $productIds); 427 426 } … … 436 435 function getProductsClassFullByProductId($productId, $has_deleted = false) { 437 436 $arrRet = $this->getProductsClassByProductIds(array($productId), $has_deleted); 437 438 438 return $arrRet; 439 439 } … … 458 458 $results[$status['product_id']][] = $status['product_status_id']; 459 459 } 460 460 461 return $results; 461 462 } … … 504 505 $limit = $p['stock']; 505 506 } 507 506 508 return $limit; 507 509 } … … 701 703 ) AS alldtl 702 704 __EOS__; 705 703 706 return $sql; 704 707 } … … 750 753 ) as prdcls 751 754 __EOS__; 755 752 756 return $sql; 753 757 } -
branches/version-2_12-dev/data/class/pages/products/LC_Page_Products_List.php
r22486 r22507 375 375 } 376 376 377 $searchCondition['where_for_count'] = $searchCondition['where'];378 379 377 // 在庫無し商品の非表示 380 378 if (NOSTOCK_HIDDEN) { 381 379 $searchCondition['where'] .= ' AND EXISTS(SELECT * FROM dtb_products_class WHERE product_id = alldtl.product_id AND del_flg = 0 AND (stock >= 1 OR stock_unlimited = 1))'; 382 $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))'; 383 } 380 } 381 382 // XXX 一時期内容が異なっていたことがあるので別要素にも格納している。 383 $searchCondition['where_for_count'] = $searchCondition['where']; 384 384 385 385 return $searchCondition;
Note: See TracChangeset
for help on using the changeset viewer.