Ignore:
Timestamp:
2012/08/21 17:02:22 (12 years ago)
Author:
habu
Message:

#1921 商品種別の違う商品を購入しようとするとエラー

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/data/class/helper/SC_Helper_Purchase.php

    r21951 r22004  
    200200     */ 
    201201    function verifyChangeCart($uniqId, &$objCartSession) { 
    202         $cartKeys = $objCartSession->getKeys(); 
     202        $cartKey = $objCartSession->getKey(); 
    203203 
    204204        // カート内が空でないか 
    205         if (SC_Utils_Ex::isBlank($cartKeys)) { 
     205        if (SC_Utils_Ex::isBlank($cartKey)) { 
    206206            SC_Response_Ex::sendRedirect(CART_URLPATH); 
    207207            exit; 
    208208        } 
    209209 
    210         foreach ($cartKeys as $cartKey) { 
    211             // 初回のみカートの内容を保存 
    212             $objCartSession->saveCurrentCart($uniqId, $cartKey); 
    213  
    214             /* 
    215              * POSTのユニークIDとセッションのユニークIDを比較 
    216              *(ユニークIDがPOSTされていない場合はスルー) 
    217              */ 
    218             if (!SC_SiteSession_Ex::checkUniqId()) { 
    219                 SC_Utils_Ex::sfDispSiteError(CANCEL_PURCHASE); 
    220                 exit; 
    221             } 
    222  
    223             // 購入ボタンを押してから変化がないか 
    224             $quantity = $objCartSession->getTotalQuantity($cartKey); 
    225             if ($objCartSession->checkChangeCart($cartKey) || !($quantity > 0)) { 
    226                 SC_Response_Ex::sendRedirect(CART_URLPATH); 
    227                 exit; 
    228             } 
     210        // 初回のみカートの内容を保存 
     211        $objCartSession->saveCurrentCart($uniqId, $cartKey); 
     212 
     213        /* 
     214         * POSTのユニークIDとセッションのユニークIDを比較 
     215         *(ユニークIDがPOSTされていない場合はスルー) 
     216         */ 
     217        if (!SC_SiteSession_Ex::checkUniqId()) { 
     218            SC_Utils_Ex::sfDispSiteError(CANCEL_PURCHASE); 
     219            exit; 
     220        } 
     221 
     222        // 購入ボタンを押してから変化がないか 
     223        $quantity = $objCartSession->getTotalQuantity($cartKey); 
     224        if ($objCartSession->checkChangeCart($cartKey) || !($quantity > 0)) { 
     225            SC_Response_Ex::sendRedirect(CART_URLPATH); 
     226            exit; 
    229227        } 
    230228    } 
Note: See TracChangeset for help on using the changeset viewer.