Changeset 14117 for branches/rel


Ignore:
Timestamp:
2007/06/01 16:48:18 (15 years ago)
Author:
kakinaka
Message:
 
Location:
branches/rel
Files:
3 edited

Legend:

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

    r14112 r14117  
    173173     
    174174    // ¥«¡¼¥È¤Ø¤Î¾¦ÉÊÄɲà
    175     function addProduct($id, $quantity, $is_campaign) { 
     175    function addProduct($id, $quantity, $campaign_id = "") { 
    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; 
     184                    if(!empty($campaign_id)){ 
     185                        $_SESSION[$this->key][$i]['campaign_id'] = $campaign_id; 
     186                        $_SESSION[$this->key][$i]['is_campaign'] = true; 
     187                    } 
    185188                } 
    186189                $find = true; 
     
    191194            $_SESSION[$this->key][$max+1]['quantity'] = $quantity; 
    192195            $_SESSION[$this->key][$max+1]['cart_no'] = $this->getNextCartID(); 
    193             if($is_campaign) $_SESSION[$this->key][$max+1]['is_campaign'] = $is_campaign; 
     196            if(!empty($campaign_id)){ 
     197                $_SESSION[$this->key][$max+1]['campaign_id'] = $campaign_id; 
     198                $_SESSION[$this->key][$max+1]['is_campaign'] = true; 
     199            } 
    194200        } 
    195201    } 
     
    327333    /** 
    328334     * ¥«¡¼¥È¤ÎÃæ¤Î¥­¥ã¥ó¥Ú¡¼¥ó¾¦ÉʤΥÁ¥§¥Ã¥¯ 
    329      * @param void 
     335     * @param integer $campaign_id ¥­¥ã¥ó¥Ú¡¼¥óID 
    330336     * @return boolean True:¥­¥ã¥ó¥Ú¡¼¥ó¾¦ÉÊÍ­¤ê False:¥­¥ã¥ó¥Ú¡¼¥ó¾¦ÉÊ̵¤· 
    331337     */ 
    332     function chkCampaign(){ 
    333         $max = $this->getMax(); 
    334         for($i = 0; $i <= $max; $i++) { 
    335             if($_SESSION[$this->key][$i]['is_campaign']) return true; 
     338    function chkCampaign($campaign_id){ 
     339        $max = $this->getMax(); 
     340        for($i = 0; $i <= $max; $i++) { 
     341            if($_SESSION[$this->key][$i]['is_campaign'] and $_SESSION[$this->key][$i]['campaign_id'] == $campaign_id) return true; 
    336342        } 
    337343         
  • branches/rel/html/install/user_data/include/campaign/default/src/index.php

    r14112 r14117  
    7373        } 
    7474        $objCartSess->setPrevURL($_SERVER['REQUEST_URI']); 
    75         $objCartSess->addProduct(array($_POST['product_id'], $classcategory_id1, $classcategory_id2), $_POST[$quantity], true); 
     75        $objCartSess->addProduct(array($_POST['product_id'], $classcategory_id1, $classcategory_id2), $_POST[$quantity], $campaign_id); 
    7676        header("Location: " . URL_CART_TOP); 
    7777        exit; 
  • branches/rel/html/shopping/complete.php

    r14112 r14117  
    200200    lfDeleteTempOrder($objQuery, $uniqid); 
    201201    // ¥­¥ã¥ó¥Ú¡¼¥ó¤«¤é¤ÎÁ«°Ü¤Î¾ì¹çÅÐÏ¿¤¹¤ë¡£ 
    202     if($objCampaignSess->getIsCampaign() and $objCartSess->chkCampaign()) { 
     202    if($objCampaignSess->getIsCampaign() and $objCartSess->chkCampaign($objCampaignSess->getCampaignId())) { 
    203203        lfRegistCampaignOrder($objQuery, $objCampaignSess, $order_id); 
    204204    } 
Note: See TracChangeset for help on using the changeset viewer.