Changeset 14112 for branches/rel/data


Ignore:
Timestamp:
2007/06/01 16:25:20 (17 years ago)
Author:
kakinaka
Message:

キャンペーンページを閲覧後、通常の商品を購入すると閲覧したキャンペーンに応募したことになってしまう問題を修正

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/rel/data/class/SC_CartSession.php

    r12157 r14112  
    173173     
    174174    // ¥«¡¼¥È¤Ø¤Î¾¦ÉÊÄɲà
    175     function addProduct($id, $quantity) { 
     175    function addProduct($id, $quantity, $is_campaign) { 
    176176        $find = false; 
    177177        $max = $this->getMax(); 
     
    182182                if(strlen($val) <= INT_LEN) { 
    183183                    $_SESSION[$this->key][$i]['quantity']+= $quantity; 
     184                    if($is_campaign) $_SESSION[$this->key][$i]['is_campaign'] = $is_campaign; 
    184185                } 
    185186                $find = true; 
     
    190191            $_SESSION[$this->key][$max+1]['quantity'] = $quantity; 
    191192            $_SESSION[$this->key][$max+1]['cart_no'] = $this->getNextCartID(); 
     193            if($is_campaign) $_SESSION[$this->key][$max+1]['is_campaign'] = $is_campaign; 
    192194        } 
    193195    } 
     
    322324        } 
    323325    } 
    324      
     326     
     327    /** 
     328     * ¥«¡¼¥È¤ÎÃæ¤Î¥­¥ã¥ó¥Ú¡¼¥ó¾¦ÉʤΥÁ¥§¥Ã¥¯ 
     329     * @param void 
     330     * @return boolean True:¥­¥ã¥ó¥Ú¡¼¥ó¾¦ÉÊÍ­¤ê False:¥­¥ã¥ó¥Ú¡¼¥ó¾¦ÉÊ̵¤· 
     331     */ 
     332    function chkCampaign(){ 
     333        $max = $this->getMax(); 
     334        for($i = 0; $i <= $max; $i++) { 
     335            if($_SESSION[$this->key][$i]['is_campaign']) return true; 
     336        } 
     337         
     338        return false; 
     339    } 
     340     
    325341} 
    326342?> 
Note: See TracChangeset for help on using the changeset viewer.