Changeset 18583


Ignore:
Timestamp:
2010/02/24 17:09:05 (14 years ago)
Author:
shutta
Message:

r18465 だと在庫・購入制限が正常に動作しないので修正。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_4-dev/data/class/helper/SC_Helper_DB.php

    r18472 r18583  
    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 
     320                    if ($arrData['stock_unlimited'] != '1') { 
     321                        $limit = min(SALE_LIMIT_MAX, $arrData['stock']); 
    316322                    } 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に 
    330323                        $limit = SALE_LIMIT_MAX; 
    331324                    } 
Note: See TracChangeset for help on using the changeset viewer.