Changeset 19919


Ignore:
Timestamp:
2011/01/15 00:26:52 (10 years ago)
Author:
nanasess
bzr:base-revision:
svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/version-2_5-dev:19918
bzr:committer:
Kentaro Ohkouchi <ohkouchi@loop-az.jp>
bzr:file-ids:

data/Smarty/templates/admin/order/edit.tpl 15732@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2FSmarty%2Ftemplates%2Fdefault%2Fadmin%2Forder%2Fedit.tpl
data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php 15594@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fadmin%2Forder%2FLC_Page_Admin_Order_Edit.php
data/install.php 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Finstall.php
bzr:mapping-version:
v4
bzr:merge:

ohkouchi@loop-az.jp-20110114152002-2a25o1qydq86sv4l
bzr:repository-uuid:
1e3b908f-19a9-db11-a64c-001125224ba8
bzr:revision-id:
ohkouchi@loop-az.jp-20110114152640-oyr8511e1um7qqsm
bzr:revno:
2648
bzr:revprop:branch-nick:
branches/version-2_5-dev
bzr:root:
branches/version-2_5-dev
bzr:text-revisions:

data/Smarty/templates/admin/order/edit.tpl ohkouchi@loop-az.jp-20110114144457-6meixrlreer2scpf
data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php ohkouchi@loop-az.jp-20110114152002-2a25o1qydq86sv4l
bzr:timestamp:
2011-01-15 00:26:40.012000084 +0900
bzr:user-agent:
bzr2.2.1+bzr-svn1.0.4
svn:original-date:
2011-01-14T15:26:40.012000Z
Message:

#843(複数配送先の指定)

  • 受注編集画面を修正
Location:
branches/version-2_5-dev/data
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/data/Smarty/templates/admin/order/edit.tpl

    r19912 r19919  
    347347    </h2> 
    348348 
    349     <!--{foreach item=shippingItem name=shippingItem from=$arrShipping}--> 
    350     <!--{assign var=shipping_id value=$shippingItem.shipping_id}--> 
    351     <h3>お届け先<!--{$smarty.foreach.shippingItem.iteration}--></h3> 
     349    <!--{assign var=key value="shipping_quantity"}--> 
     350    <input type="hidden" name="<!--{$key}-->" value="<!--{$arrForm[$key].value|h}-->" /> 
     351 
     352    <!--{section name=shipping loop=$arrForm.shipping_quantity.value}--> 
     353    <!--{assign var=shipping_index value="`$smarty.section.shipping.index`"}--> 
     354 
     355    <!--{assign var=shipping_id value=$arrShippingIds[$shipping_index]}--> 
     356    <!--{if $arrForm.shipping_quantity.value > 1}--> 
     357    <h3>お届け先<!--{$smarty.section.shipping.iteration}--></h3 
     358    <!--{/if}--> 
     359 
     360    <!--{if $arrForm.shipping_quantity.value > 1}--> 
     361    <!--{assign var=product_quantity value="shipping_product_quantity_`$shipping_id`"}--> 
     362    <input type="hidden" name="<!--{$product_quantity}-->" value="<!--{$arrForm[$product_quantity].value|h}-->" /> 
    352363    <table class="list" id="order-edit-products"> 
    353364      <tr> 
     
    357368        <th class="qty">数量</th> 
    358369      </tr> 
    359       <!--{foreach item=item from=$shippingItem.shipment_item}--> 
     370      <!--{section name=item loop=$arrForm[$product_quantity].value}--> 
     371      <!--{assign var=item_index value="`$smarty.section.item.index`"}--> 
     372      <!--{assign var=product_class_id value=$arrProductClassIds[$shipping_index][$item_index]}--> 
    360373      <tr> 
    361         <td><!--{$item.product_code|h}--></td> 
    362374        <td> 
    363             <!--{$item.productsClass.name|h}-->/<!--{$item.productsClass.classcategory_name1|default:"(なし)"|h}-->/<!--{$item.productsClass.classcategory_name2|default:"(なし)"|h}--> 
     375          <!--{assign var=key value="product_code_`$shipping_id`_`$product_class_id`"}--> 
     376          <input type="hidden" name="<!--{$key}-->" value="<!--{$arrForm[$key].value|h}-->" /> 
     377          <!--{$arrForm[$key].value|h}--> 
     378        </td> 
     379        <td> 
     380          <!--{assign var=key1 value="product_name_`$shipping_id`_`$product_class_id`"}--> 
     381          <!--{assign var=key2 value="classcategory_name1_`$shipping_id`_`$product_class_id`"}--> 
     382          <!--{assign var=key3 value="classcategory_name2_`$shipping_id`_`$product_class_id`"}--> 
     383          <input type="hidden" name="<!--{$key1}-->" value="<!--{$arrForm[$key1].value|h}-->" /> 
     384          <input type="hidden" name="<!--{$key2}-->" value="<!--{$arrForm[$key2].value|h}-->" /> 
     385          <input type="hidden" name="<!--{$key3}-->" value="<!--{$arrForm[$key3].value|h}-->" /> 
     386          <!--{$arrForm[$key1].value|h}-->/<!--{$arrForm[$key2].value|default:"(なし)"|h}-->/<!--{$arrForm[$key3].value|default:"(なし)"|h}--> 
    364387        </td> 
    365388        <td class="right"> 
    366             <!--{$item.productsClass.price02|sfCalcIncTax:$arrInfo.tax:$arrInfo.tax_rule|number_format}-->円 
     389          <!--{assign var=key value="price_`$shipping_id`_`$product_class_id`"}--> 
     390          <!--{$arrForm[$key].value|sfCalcIncTax:$arrInfo.tax:$arrInfo.tax_rule|number_format}-->円 
     391          <input type="hidden" name="<!--{$key}-->" value="<!--{$arrForm[$key].value|h}-->" /> 
    367392        </td> 
    368         <td class="right"><!--{$item.quantity}--></td> 
    369         <!--{* XXX 購入小計と誤差が出るためコメントアウト 
    370         <td class="pricetd"><!--{$item.total_inctax|number_format}-->円</td> 
    371         *}--> 
     393        <td class="right"> 
     394          <!--{assign var=key value="quantity_`$shipping_id`_`$product_class_id`"}--> 
     395          <!--{$arrForm[$key].value|h}--> 
     396          <input type="hidden" name="<!--{$key}-->" value="<!--{$arrForm[$key].value|h}-->" /> 
     397        </td> 
    372398      </tr> 
    373       <!--{/foreach}--> 
     399      <!--{/section}--> 
     400    </table> 
     401    <!--{/if}--> 
    374402 
    375403    <table class="form"> 
     
    377405            <th>お名前</th> 
    378406            <td> 
    379                 <!--{assign var=key1 value="shipping_name01`$shipping_id`"}--> 
    380                 <!--{assign var=key2 value="shipping_name02`$shipping_id`"}--> 
     407                <!--{assign var=key1 value="shipping_name01_`$shipping_id`"}--> 
     408                <!--{assign var=key2 value="shipping_name02_`$shipping_id`"}--> 
    381409                <span class="attention"><!--{$arrErr[$key1]}--><!--{$arrErr[$key2]}--></span> 
    382410                <input type="text" name="<!--{$key1}-->" value="<!--{$arrForm[$key1].value|h}-->" maxlength="<!--{$arrForm[$key1].length}-->" style="<!--{$arrErr[$key1]|sfGetErrorColor}-->" size="15" class="box15" /> 
     
    387415            <th>お名前(カナ)</th> 
    388416            <td> 
    389                 <!--{assign var=key1 value="shipping_kana01`$shipping_id`"}--> 
    390                 <!--{assign var=key2 value="shipping_kana02`$shipping_id`"}--> 
     417                <!--{assign var=key1 value="shipping_kana01_`$shipping_id`"}--> 
     418                <!--{assign var=key2 value="shipping_kana02_`$shipping_id`"}--> 
    391419                <span class="attention"><!--{$arrErr[$key1]}--><!--{$arrErr[$key2]}--></span> 
    392420                <input type="text" name="<!--{$key1}-->" value="<!--{$arrForm[$key1].value|h}-->" maxlength="<!--{$arrForm[$key1].length}-->" style="<!--{$arrErr[$key1]|sfGetErrorColor}-->" size="15" class="box15" /> 
     
    397425            <th>TEL</th> 
    398426            <td> 
    399                 <!--{assign var=key1 value="shipping_tel01`$shipping_id`"}--> 
    400                 <!--{assign var=key2 value="shipping_tel02`$shipping_id`"}--> 
    401                 <!--{assign var=key3 value="shipping_tel03`$shipping_id`"}--> 
     427                <!--{assign var=key1 value="shipping_tel01_`$shipping_id`"}--> 
     428                <!--{assign var=key2 value="shipping_tel02_`$shipping_id`"}--> 
     429                <!--{assign var=key3 value="shipping_tel03_`$shipping_id`"}--> 
    402430                <span class="attention"><!--{$arrErr[$key1]}--></span> 
    403431                <span class="attention"><!--{$arrErr[$key2]}--></span> 
     
    411439            <th>住所</th> 
    412440            <td> 
    413                 <!--{assign var=key1 value="shipping_zip01`$shipping_id`"}--> 
    414                 <!--{assign var=key2 value="shipping_zip02`$shipping_id`"}--> 
     441                <!--{assign var=key1 value="shipping_zip01_`$shipping_id`"}--> 
     442                <!--{assign var=key2 value="shipping_zip02_`$shipping_id`"}--> 
    415443                <span class="attention"><!--{$arrErr[$key1]}--><!--{$arrErr[$key2]}--></span> 
    416444                〒 
     
    419447                <input type="text" name="<!--{$key2}-->" value="<!--{$arrForm[$key2].value|h}-->" maxlength="<!--{$arrForm[$key2].length}-->" style="<!--{$arrErr[$key2]|sfGetErrorColor}-->" size="6" class="box6" /> 
    420448                <a class="btn-normal" href="javascript:;" name="address_input" onclick="fnCallAddress('<!--{$smarty.const.INPUT_ZIP_URL_PATH}-->', 'shipping_zip01', 'shipping_zip02', 'shipping_pref', 'shipping_addr01');">住所入力</a><br /> 
    421                 <!--{assign var=key value="shipping_pref`$shipping_id`"}--> 
     449                <!--{assign var=key value="shipping_pref_`$shipping_id`"}--> 
    422450                <span class="attention"><!--{$arrErr[$key]}--></span> 
    423451                <select name="<!--{$key}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->"> 
     
    425453                    <!--{html_options options=$arrPref selected=$arrForm[$key].value}--> 
    426454                </select><br /> 
    427                 <!--{assign var=key value="shipping_addr01`$shipping_id`"}--> 
     455                <!--{assign var=key value="shipping_addr01_`$shipping_id`"}--> 
    428456                <span class="attention"><!--{$arrErr[$key]}--></span> 
    429457                <input type="text" name="<!--{$key}-->" value="<!--{$arrForm[$key].value|h}-->" size="60" class="box60" maxlength="<!--{$arrForm[$key].length}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" /><br /> 
    430                 <!--{assign var=key value="shipping_addr02`$shipping_id`"}--> 
     458                <!--{assign var=key value="shipping_addr02_`$shipping_id`"}--> 
    431459                <span class="attention"><!--{$arrErr[$key]}--></span> 
    432460                <input type="text" name="<!--{$key}-->" value="<!--{$arrForm[$key].value|h}-->" size="60" class="box60" maxlength="<!--{$arrForm[$key].length}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" /> 
     
    436464            <th>お届け時間</th> 
    437465            <td> 
    438                 <!--{assign var=key value="deliv_time_id`$shipping_id`"}--> 
     466                <!--{assign var=key value="deliv_time_id_`$shipping_id`"}--> 
    439467                <span class="attention"><!--{$arrErr[$key]}--></span> 
    440468                <select name="<!--{$key}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->"> 
     
    447475            <th>お届け日</th> 
    448476            <td> 
    449                 <!--{assign var=key value="deliv_date`$shipping_id`"}--> 
     477                <!--{assign var=key value="deliv_date_`$shipping_id`"}--> 
    450478                <span class="attention"><!--{$arrErr[$key]}--></span> 
    451479                <input 
     
    460488 
    461489    </table> 
    462     <!--{/foreach}--> 
     490    <!--{/section}--> 
    463491    <!--▲お届け先情報ここまで--> 
    464492 
  • branches/version-2_5-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php

    r19912 r19919  
    277277        $this->objFormParam->addParam("値引き", "discount", INT_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "NUM_CHECK"), '0'); 
    278278        $this->objFormParam->addParam("送料", "deliv_fee", INT_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "NUM_CHECK"), '0'); 
    279         $this->objFormParam->addParam("手数料", "charge", INT_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "NUM_CHECK")); 
     279        $this->objFormParam->addParam("手数料", "charge", INT_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "NUM_CHECK"), '0'); 
    280280 
    281281        // ポイント機能ON時のみ 
     
    317317    } 
    318318 
     319    /** 
     320     * お届け先用フォームの初期化 
     321     */ 
     322    function lfInitShippingParam(&$arrShipping) { 
     323        $this->objFormParam->addParam("配送数", "shipping_quantity", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK")); 
     324        foreach ($arrShipping as $shipping) { 
     325            $this->objFormParam->addParam("配送ID", "shipping_id_" . $shipping['shipping_id'], INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK")); 
     326            $this->objFormParam->addParam("お名前1", "shipping_name01_" . $shipping['shipping_id'], STEXT_LEN, "KVa", array("SPTAB_CHECK", "MAX_LENGTH_CHECK")); 
     327            $this->objFormParam->addParam("お名前2", "shipping_name02_" . $shipping['shipping_id'], STEXT_LEN, "KVa", array("SPTAB_CHECK", "MAX_LENGTH_CHECK")); 
     328            $this->objFormParam->addParam("お名前(フリガナ・姓)", "shipping_kana01_" . $shipping['shipping_id'], STEXT_LEN, "KVCa", array("SPTAB_CHECK", "MAX_LENGTH_CHECK")); 
     329            $this->objFormParam->addParam("お名前(フリガナ・名)", "shipping_kana02_" . $shipping['shipping_id'], STEXT_LEN, "KVCa", array("SPTAB_CHECK", "MAX_LENGTH_CHECK")); 
     330            $this->objFormParam->addParam("郵便番号1", "shipping_zip01_" . $shipping['shipping_id'], ZIP01_LEN, "n", array("NUM_CHECK", "NUM_COUNT_CHECK")); 
     331            $this->objFormParam->addParam("郵便番号2", "shipping_zip02_" . $shipping['shipping_id'], ZIP02_LEN, "n", array("NUM_CHECK", "NUM_COUNT_CHECK")); 
     332            $this->objFormParam->addParam("都道府県", "shipping_pref_" . $shipping['shipping_id'], INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK")); 
     333            $this->objFormParam->addParam("住所1", "shipping_addr01_" . $shipping['shipping_id'], MTEXT_LEN, "KVa", array("SPTAB_CHECK", "MAX_LENGTH_CHECK")); 
     334            $this->objFormParam->addParam("住所2", "shipping_addr02_" . $shipping['shipping_id'], MTEXT_LEN, "KVa", array("SPTAB_CHECK", "MAX_LENGTH_CHECK")); 
     335            $this->objFormParam->addParam("電話番号1", "shipping_tel01_" . $shipping['shipping_id'], TEL_ITEM_LEN, "n", array("MAX_LENGTH_CHECK" ,"NUM_CHECK")); 
     336            $this->objFormParam->addParam("電話番号2", "shipping_tel02_" . $shipping['shipping_id'], TEL_ITEM_LEN, "n", array("MAX_LENGTH_CHECK" ,"NUM_CHECK")); 
     337            $this->objFormParam->addParam("電話番号3", "shipping_tel03_" . $shipping['shipping_id'], TEL_ITEM_LEN, "n", array("MAX_LENGTH_CHECK" ,"NUM_CHECK")); 
     338            $this->objFormParam->addParam("お届け時間ID", "deliv_time_id_" . $shipping['shipping_id'], INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK")); 
     339            $this->objFormParam->addParam("お届け時間", "deliv_time_" . $shipping['shipping_id']); 
     340            $this->objFormParam->addParam("お届け日", "deliv_date_" . $shipping['shipping_id'], STEXT_LEN, "KVa", array("SPTAB_CHECK", "MAX_LENGTH_CHECK")); 
     341            $this->objFormParam->addParam("配送商品規格数", "shipping_product_quantity_" . $shipping['shipping_id'], INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK")); 
     342            foreach ($shipping['shipment_item'] as $productClassId => $item) { 
     343                $this->objFormParam->addParam("商品規格ID", "product_class_id_" . $shipping['shipping_id'] . '_' . $productClassId, INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK")); 
     344                $this->objFormParam->addParam("商品コード", "product_code_" . $shipping['shipping_id'] . '_' . $productClassId); 
     345                $this->objFormParam->addParam("商品名", "product_name_" . $shipping['shipping_id'] . '_' . $productClassId); 
     346                $this->objFormParam->addParam("規格名1", "classcategory_name1_" . $shipping['shipping_id'] . '_' . $productClassId); 
     347                $this->objFormParam->addParam("規格名2", "classcategory_name2_" . $shipping['shipping_id'] . '_' . $productClassId); 
     348                $this->objFormParam->addParam("単価", "price_" . $shipping['shipping_id'] . '_' . $productClassId, INT_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "NUM_CHECK"), '0'); 
     349                $this->objFormParam->addParam("数量", "quantity_" . $shipping['shipping_id'] . '_' . $productClassId, INT_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "NUM_CHECK"), '0'); 
     350            } 
     351        } 
     352    } 
     353 
     354 
    319355    function lfGetOrderData($order_id) { 
    320356        if(SC_Utils_Ex::sfIsInt($order_id)) { 
     
    325361            $arrRet = $objQuery->select("*", "dtb_order", $where, array($order_id)); 
    326362            $this->objFormParam->setParam($arrRet[0]); 
    327             list($db_point, $rollback_point) = $objDb->sfGetRollbackPoint($order_id, $arrRet[0]['use_point'], $arrRet[0]['add_point']); 
     363            list($db_point, $rollback_point) = $objDb->sfGetRollbackPoint($order_id, $arrRet[0]['use_point'], $arrRet[0]['add_point']); 
    328364            $this->objFormParam->setValue('total_point', $db_point); 
    329365            $this->objFormParam->setValue('point', $rollback_point); 
     
    338374            $this->arrShipping = $this->lfGetShippingData($order_id); 
    339375            $this->lfInitShippingParam($this->arrShipping); 
     376 
     377            $this->arrForm['shipping_quantity'] = count($this->arrShipping); 
     378            $this->objFormParam->setValue('shipping_quantity', $this->arrForm['shipping_quantity']); 
     379 
    340380            foreach ($this->arrShipping as $shipping) { 
     381 
     382                $this->arrShippingIds[] = $shipping['shipping_id']; 
     383                $this->arrProductClassIds[] = array_keys($shipping['shipment_item']); 
    341384                foreach ($shipping as $shippingKey => $shippingVal) { 
    342                     $this->arrForm[$shippingKey . $shipping['shipping_id']] = $shippingVal; 
    343                     $this->objFormParam->setValue($shippingKey . $shipping['shipping_id'], $shippingVal); 
     385 
     386                    $this->arrForm[$shippingKey . '_' . $shipping['shipping_id']] = $shippingVal; 
     387                    $this->objFormParam->setValue($shippingKey . '_' . $shipping['shipping_id'], $shippingVal); 
     388 
     389                    $this->arrForm['shipping_product_quantity' . '_' . $shipping['shipping_id']] = count($shipping['shipment_item']); 
     390                    $this->objFormParam->setValue('shipping_product_quantity' . '_' . $shipping['shipping_id'], 
     391                                                  $this->arrForm['shipping_product_quantity' . '_' . $shipping['shipping_id']]); 
     392 
     393                    foreach ($shipping['shipment_item'] as $productClassId => $item) { 
     394                        foreach ($item as $itemKey => $itemVal) { 
     395                            $this->arrForm[$itemKey . '_' . $shipping['shipping_id'] . '_' . $productClassId] = $itemVal; 
     396                            $this->objFormParam->setValue($itemKey . '_' . $shipping['shipping_id'] . '_' . $productClassId, $itemVal); 
     397                        } 
     398                    } 
    344399                } 
    345400            } 
     
    392447    } 
    393448 
    394     /** 
    395      * お届け先用フォームの初期化 
    396      */ 
    397     function lfInitShippingParam(&$arrShipping) { 
    398         foreach ($arrShipping as $shipping) { 
    399             $this->objFormParam->addParam("お名前1", "shipping_name01" . $shipping['shipping_id'], STEXT_LEN, "KVa", array("SPTAB_CHECK", "MAX_LENGTH_CHECK")); 
    400             $this->objFormParam->addParam("お名前2", "shipping_name02" . $shipping['shipping_id'], STEXT_LEN, "KVa", array("SPTAB_CHECK", "MAX_LENGTH_CHECK")); 
    401             $this->objFormParam->addParam("お名前(フリガナ・姓)", "shipping_kana01" . $shipping['shipping_id'], STEXT_LEN, "KVCa", array("SPTAB_CHECK", "MAX_LENGTH_CHECK")); 
    402             $this->objFormParam->addParam("お名前(フリガナ・名)", "shipping_kana02" . $shipping['shipping_id'], STEXT_LEN, "KVCa", array("SPTAB_CHECK", "MAX_LENGTH_CHECK")); 
    403             $this->objFormParam->addParam("郵便番号1", "shipping_zip01" . $shipping['shipping_id'], ZIP01_LEN, "n", array("NUM_CHECK", "NUM_COUNT_CHECK")); 
    404             $this->objFormParam->addParam("郵便番号2", "shipping_zip02" . $shipping['shipping_id'], ZIP02_LEN, "n", array("NUM_CHECK", "NUM_COUNT_CHECK")); 
    405             $this->objFormParam->addParam("都道府県", "shipping_pref" . $shipping['shipping_id'], INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK")); 
    406             $this->objFormParam->addParam("住所1", "shipping_addr01" . $shipping['shipping_id'], MTEXT_LEN, "KVa", array("SPTAB_CHECK", "MAX_LENGTH_CHECK")); 
    407             $this->objFormParam->addParam("住所2", "shipping_addr02" . $shipping['shipping_id'], MTEXT_LEN, "KVa", array("SPTAB_CHECK", "MAX_LENGTH_CHECK")); 
    408             $this->objFormParam->addParam("電話番号1", "shipping_tel01" . $shipping['shipping_id'], TEL_ITEM_LEN, "n", array("MAX_LENGTH_CHECK" ,"NUM_CHECK")); 
    409             $this->objFormParam->addParam("電話番号2", "shipping_tel02" . $shipping['shipping_id'], TEL_ITEM_LEN, "n", array("MAX_LENGTH_CHECK" ,"NUM_CHECK")); 
    410             $this->objFormParam->addParam("電話番号3", "shipping_tel03" . $shipping['shipping_id'], TEL_ITEM_LEN, "n", array("MAX_LENGTH_CHECK" ,"NUM_CHECK")); 
    411             $this->objFormParam->addParam("お届け時間ID", "deliv_time_id" . $shipping['shipping_id'], INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK")); 
    412             $this->objFormParam->addParam("お届け時間", "deliv_time" . $shipping['shipping_id']); 
    413             $this->objFormParam->addParam("お届け日", "deliv_date" . $shipping['shipping_id'], STEXT_LEN, "KVa", array("SPTAB_CHECK", "MAX_LENGTH_CHECK")); 
    414         } 
    415     } 
    416  
    417449    /* 入力内容のチェック */ 
    418450    function lfCheckError() { 
     
    504536 
    505537        // 受注テーブルの更新 
    506         $objQuery->update("dtb_order", $sqlval, $where, array($order_id)); 
     538        $this->registerOrder($sqlval, $order_id); 
    507539 
    508540        // 受注テーブルの名称列を更新 
    509         SC_Helper_DB_Ex::sfUpdateOrderNameCol($order_id); 
     541        //SC_Helper_DB_Ex::sfUpdateOrderNameCol($order_id); 
    510542 
    511543        $arrDetail = $this->objFormParam->getSwapArray(array("product_id", "product_class_id", "product_code", "product_name", "price", "quantity", "point_rate", "classcategory_name1", "classcategory_name2")); 
     
    656688    } 
    657689 
     690    /** 
     691     * 受注を登録する 
     692     */ 
     693    function registerOrder($sqlval, $order_id) { 
     694        $table = 'dtb_order'; 
     695        $objQuery = SC_Query::getSingletonInstance(); 
     696        $cols = $objQuery->listTableFields($table); 
     697        $dest = array(); 
     698        foreach ($sqlval as $key => $val) { 
     699            if (in_array($cols, $key)) { 
     700                $dest[$key] = $val; 
     701            } 
     702        } 
     703        $result = $objQuery->update($table, $dest, "order_id = ?", array($order_id)); 
     704        if ($result == 0) { 
     705            $result = $objQuery->insert($table, $dest); 
     706        } 
     707    } 
     708 
    658709    function lfInsertProduct($product_class_id) { 
    659710        $objProduct = new SC_Product(); 
Note: See TracChangeset for help on using the changeset viewer.