Changeset 18160


Ignore:
Timestamp:
2009/07/03 14:25:09 (15 years ago)
Author:
kajiwara
Message:

#464 受注新規追加機能での同一商品追加時の処理 の修正

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_4/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php

    r18154 r18160  
    699699        $arrProduct = $this->lfGetProductsClass($product_id, $classcategory_id1, $classcategory_id2); 
    700700        $this->arrForm = $this->objFormParam->getFormParamList(); 
    701         $this->lfSetProductData($arrProduct); 
     701        $existes = false; 
     702        $existes_key = NULL; 
     703        // 既に同じ商品がないか、確認する 
     704        if (!empty($this->arrForm['product_id']['value'])) { 
     705            foreach ($this->arrForm['product_id']['value'] AS $key=>$val) { 
     706                if ($val == $product_id && $this->arrForm['product_id']['classcategory_id1'][$key] == $classcategory_id1 && $this->arrForm['product_id']['classcategory_id2'][$key] == $classcategory_id2) { 
     707                    // 既に同じ商品がある 
     708                    $existes = true; 
     709                    $existes_key = $key; 
     710                } 
     711            } 
     712        } 
     713 
     714        if ($existes) { 
     715            // 既に同じ商品がある場合 
     716            ++$this->arrForm['quantity']['value'][$existes_key]; 
     717        } else { 
     718            // 既に同じ商品がない場合 
     719            $this->lfSetProductData($arrProduct); 
     720        } 
    702721    } 
    703722 
Note: See TracChangeset for help on using the changeset viewer.