Ignore:
Timestamp:
2010/07/20 13:25:33 (14 years ago)
Author:
kajiwara
Message:

EC-CUBE Ver2.4.4 分コミット。詳細はこちら( http://www.ec-cube.net/release/detail.php?release_id=223

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/data/class/helper/SC_Helper_DB.php

    r18562 r18758  
    33 * This file is part of EC-CUBE 
    44 * 
    5  * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved. 
     5 * Copyright(c) 2000-2010 LOCKON CO.,LTD. All Rights Reserved. 
    66 * 
    77 * http://www.lockon.co.jp/ 
     
    258258        $table = "vw_product_class AS prdcls"; 
    259259        $where = "product_id = ? AND classcategory_id1 = ? AND classcategory_id2 = ? AND status = 1"; 
    260         $objQuery->setorder("rank1 DESC, rank2 DESC"); 
     260        $objQuery->setOrder("rank1 DESC, rank2 DESC"); 
    261261        $arrRet = $objQuery->select($col, $table, $where, array($product_id, $classcategory_id1, $classcategory_id2)); 
    262262        return $arrRet[0]; 
     
    272272        // 購入金額が条件額以下の項目を取得 
    273273        $where = "del_flg = 0"; 
    274         $objQuery->setorder("fix, rank DESC"); 
     274        $objQuery->setOrder("fix, rank DESC"); 
    275275        $arrRet = $objQuery->select("payment_id, payment_method, rule", "dtb_payment", $where); 
    276276        return $arrRet; 
     
    312312                // 購入制限数を求める。 
    313313                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                        } 
    316328                    } 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                        } 
    331332                    } 
    332333                } 
     
    584585            $where = "del_flg = 0"; 
    585586        } 
    586         $objQuery->setoption("ORDER BY rank DESC"); 
     587        $objQuery->setOption("ORDER BY rank DESC"); 
    587588        $arrRet = $objQuery->select($col, $from, $where); 
    588589 
     
    628629            $where = "del_flg = 0"; 
    629630        } 
    630         $objQuery->setoption("ORDER BY rank DESC"); 
     631        $objQuery->setOption("ORDER BY rank DESC"); 
    631632        $arrRet = $objQuery->select($col, $from, $where); 
    632633 
     
    714715        } 
    715716 
    716         $objQuery->setoption("ORDER BY rank DESC"); 
     717        $objQuery->setOption("ORDER BY rank DESC"); 
    717718 
    718719        if($products_check) { 
     
    748749        $col = "category_id, parent_category_id, category_name, level"; 
    749750        $where = "del_flg = 0"; 
    750         $objQuery->setoption("ORDER BY rank DESC"); 
     751        $objQuery->setOption("ORDER BY rank DESC"); 
    751752        $arrRet = $objQuery->select($col, "dtb_category", $where); 
    752753        $max = count($arrRet); 
     
    11311132        $objQuery = new SC_Query(); 
    11321133        $col = "$keyname, $valname"; 
    1133         $objQuery->setwhere("del_flg = 0"); 
    1134         $objQuery->setorder("rank DESC"); 
     1134        $objQuery->setWhere("del_flg = 0"); 
     1135        $objQuery->setOrder("rank DESC"); 
    11351136        $arrList = $objQuery->select($col, $table); 
    11361137        $count = count($arrList); 
     
    13461347        } 
    13471348 
    1348         $objQuery->setorder("level"); 
     1349        $objQuery->setOrder("level"); 
    13491350        $arrRet = $objQuery->select($col, $table, $where, $arrId); 
    13501351        return $arrRet; 
     
    14021403 
    14031404        if($deliv_id != "") { 
    1404             $objQuery->setorder("time_id"); 
     1405            $objQuery->setOrder("time_id"); 
    14051406            $where = "deliv_id = ?"; 
    14061407            $arrRet= $objQuery->select("time_id, deliv_time", "dtb_delivtime", $where, array($deliv_id)); 
Note: See TracChangeset for help on using the changeset viewer.