Changeset 18758 for trunk/data/class/helper/SC_Helper_DB.php
- Timestamp:
- 2010/07/20 13:25:33 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/data/class/helper/SC_Helper_DB.php
r18562 r18758 3 3 * This file is part of EC-CUBE 4 4 * 5 * Copyright(c) 2000-20 07LOCKON CO.,LTD. All Rights Reserved.5 * Copyright(c) 2000-2010 LOCKON CO.,LTD. All Rights Reserved. 6 6 * 7 7 * http://www.lockon.co.jp/ … … 258 258 $table = "vw_product_class AS prdcls"; 259 259 $where = "product_id = ? AND classcategory_id1 = ? AND classcategory_id2 = ? AND status = 1"; 260 $objQuery->set order("rank1 DESC, rank2 DESC");260 $objQuery->setOrder("rank1 DESC, rank2 DESC"); 261 261 $arrRet = $objQuery->select($col, $table, $where, array($product_id, $classcategory_id1, $classcategory_id2)); 262 262 return $arrRet[0]; … … 272 272 // 購入金額が条件額以下の項目を取得 273 273 $where = "del_flg = 0"; 274 $objQuery->set order("fix, rank DESC");274 $objQuery->setOrder("fix, rank DESC"); 275 275 $arrRet = $objQuery->select("payment_id, payment_method, rule", "dtb_payment", $where); 276 276 return $arrRet; … … 312 312 // 購入制限数を求める。 313 313 if ($arrData['stock_unlimited'] != '1' && $arrData['sale_unlimited'] != '1') { 314 if($arrData['sale_limit'] < $arrData['stock']) { 315 $limit = $arrData['sale_limit']; 314 $limit = min($arrData['sale_limit'], $arrData['stock']); 315 } elseif ($arrData['sale_unlimited'] != '1') { 316 $limit = $arrData['sale_limit']; 317 } else { 318 // 購入制限なしの場合は、SALE_LIMIT_MAXが最大購入個数 319 // 但し、SALE_LIMIT_MAXは、有効な整数値でないと機能しない 320 321 if ($arrData['stock_unlimited'] != '1') { 322 // 在庫制限がある場合は、SALE_LIMIT_MAXと在庫数の小さい方が購入可能最大数 323 if (SALE_LIMIT_MAX > 0) { 324 $limit = min(SALE_LIMIT_MAX, $arrData['stock']); 325 } else { 326 $limit = $arrData['stock']; 327 } 316 328 } else { 317 // 購入制限数を在庫数に 318 #$limit = $arrData['stock']; 319 // 購入制限数をSALE_LIMIT_MAXに 320 $limit = SALE_LIMIT_MAX; 321 } 322 } else { 323 if ($arrData['sale_unlimited'] != '1') { 324 $limit = $arrData['sale_limit']; 325 } 326 if ($arrData['stock_unlimited'] != '1') { 327 // 購入制限数を在庫数に 328 #$limit = $arrData['stock']; 329 // 購入制限数をSALE_LIMIT_MAXに 330 $limit = SALE_LIMIT_MAX; 329 if (SALE_LIMIT_MAX > 0) { 330 $limit = SALE_LIMIT_MAX; 331 } 331 332 } 332 333 } … … 584 585 $where = "del_flg = 0"; 585 586 } 586 $objQuery->set option("ORDER BY rank DESC");587 $objQuery->setOption("ORDER BY rank DESC"); 587 588 $arrRet = $objQuery->select($col, $from, $where); 588 589 … … 628 629 $where = "del_flg = 0"; 629 630 } 630 $objQuery->set option("ORDER BY rank DESC");631 $objQuery->setOption("ORDER BY rank DESC"); 631 632 $arrRet = $objQuery->select($col, $from, $where); 632 633 … … 714 715 } 715 716 716 $objQuery->set option("ORDER BY rank DESC");717 $objQuery->setOption("ORDER BY rank DESC"); 717 718 718 719 if($products_check) { … … 748 749 $col = "category_id, parent_category_id, category_name, level"; 749 750 $where = "del_flg = 0"; 750 $objQuery->set option("ORDER BY rank DESC");751 $objQuery->setOption("ORDER BY rank DESC"); 751 752 $arrRet = $objQuery->select($col, "dtb_category", $where); 752 753 $max = count($arrRet); … … 1131 1132 $objQuery = new SC_Query(); 1132 1133 $col = "$keyname, $valname"; 1133 $objQuery->set where("del_flg = 0");1134 $objQuery->set order("rank DESC");1134 $objQuery->setWhere("del_flg = 0"); 1135 $objQuery->setOrder("rank DESC"); 1135 1136 $arrList = $objQuery->select($col, $table); 1136 1137 $count = count($arrList); … … 1346 1347 } 1347 1348 1348 $objQuery->set order("level");1349 $objQuery->setOrder("level"); 1349 1350 $arrRet = $objQuery->select($col, $table, $where, $arrId); 1350 1351 return $arrRet; … … 1402 1403 1403 1404 if($deliv_id != "") { 1404 $objQuery->set order("time_id");1405 $objQuery->setOrder("time_id"); 1405 1406 $where = "deliv_id = ?"; 1406 1407 $arrRet= $objQuery->select("time_id, deliv_time", "dtb_delivtime", $where, array($deliv_id));
Note: See TracChangeset
for help on using the changeset viewer.