Changeset 18014


Ignore:
Timestamp:
2009/05/18 15:47:03 (15 years ago)
Author:
Yammy
Message:

http://svn.ec-cube.net/open_trac/ticket/464
対応

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/comu-ver2/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php

    r17994 r18014  
    703703        $arrProduct = $this->lfGetProductsClass($product_id, $classcategory_id1, $classcategory_id2); 
    704704        $this->arrForm = $this->objFormParam->getFormParamList(); 
    705         $this->lfSetProductData($arrProduct); 
     705        $existes = false; 
     706        $existes_key = NULL; 
     707        if (!empty($this->arrForm['product_id']['value'])) { 
     708            foreach ($this->arrForm['product_id']['value'] AS $key=>$val) { 
     709                if ($val == $product_id && $this->arrForm['product_id']['classcategory_id1'][$key] == $classcategory_id1 && $this->arrForm['product_id']['classcategory_id2'][$key] == $classcategory_id2) { 
     710                    // 既に同じ賞品がある場合 
     711                    $existes = true; 
     712                    $existes_key = $key; 
     713                } 
     714            } 
     715        } 
     716 
     717        if ($existes) { 
     718            // 既に同じ賞品がある場合 
     719            ++$this->arrForm['quantity']['value'][$existes_key]; 
     720        } else { 
     721            // 既に同じ賞品がない場合 
     722            $this->lfSetProductData($arrProduct); 
     723        } 
    706724    } 
    707725 
Note: See TracChangeset for help on using the changeset viewer.