バージョン選択

フォーラム

メニュー

オンライン状況

97 人のユーザが現在オンラインです。 (80 人のユーザが フォーラム を参照しています。)
登録ユーザ: 0
ゲスト: 97
もっと...

サイト内検索

バグ報告 > 管理機能 > v2.13.0 管理画面:受注変更画面(複数配送でない)の数量チェックの動作に不具合がある。

管理機能

新規スレッドを追加する

フラット表示 前のトピック | 次のトピック
投稿者 スレッド
sumida
投稿日時: 2013/10/12 14:54
対応状況: −−−
仙人
登録日: 2013/2/10
居住地: 広島県呉市ときどき瀬戸内海
投稿: 641
Re: v2.13.0 管理画面:受注変更画面(複数配送でない)の数量チェックの動作に不具合がある。
解決しました。
(配列に使用している2次元目の変数に間違いがあることに、気がつきませんでした。)

修正案
表示順の同期は、異なるテーブル内の商品情報なので、DBへの更新時に不都合が発生する懸念もあり、あきらめました。

data/Smarty/templates/admin/order/edit.tpl
javascriptによる動的変更部分

/* deleted
    function quantityCopyForSingleShipping(product_index){
        var product_index = parseInt(product_index);
        var input_quantity = $('input[name^="quantity[' + product_index + ']"]').val();
        $('input[name^="shipment_quantity[0][' + product_index + ']"]').val(input_quantity);
    }
deleted */

使用しているHTML部分

                <td align="center">
                    <!--{assign var=key value="quantity"}-->
                    <span class="attention"><!--{$arrErr[$key][$product_index]}--></span>
<!--{* changed
                    <input type="text" name="<!--{$key}-->[<!--{$product_index}-->]" value="<!--{$arrForm[$key].value[$product_index]|h}-->" size="3" class="box3" maxlength="<!--{$arrForm[$key].length}-->" style="<!--{$arrErr[$key][$product_index]|sfGetErrorColor}-->" id="<!--{$key}-->_<!--{$product_index}-->"  onChange="quantityCopyForSingleShipping('<!--{$product_index}-->')" />
changed *}-->
                    <input type="text" name="<!--{$key}-->[<!--{$product_index}-->]" value="<!--{$arrForm[$key].value[$product_index]|h}-->" size="3" class="box3" maxlength="<!--{$arrForm[$key].length}-->" style="<!--{$arrErr[$key][$product_index]|sfGetErrorColor}-->" id="<!--{$key}-->_<!--{$product_index}-->" />
<!--{* changed *}-->
                </td>


data/class/pages/admin/order/LC_Page_Admin_Order_edit.php
お届け先1件:
  コピー(受注商品情報の数量-->お届け先の数量)
お届け先2件以上:(既存の処理)
  合算後コピー(お届け先の数量合計)-->受注商品情報の数量

    public function setProductsQuantity(&$objFormParam)
    {
        $arrShipmentsItems = $objFormParam->getSwapArray(array('shipment_product_class_id','shipment_quantity'));
        // 配送先が存在する時のみ、商品個数の再設定を行います
        if(!SC_Utils_Ex::isBlank($arrShipmentsItems)) {
// added
    if (count($arrShipmentsItems) > 1) {
// added
            foreach ($arrShipmentsItems as $arritems) {
                foreach ($arritems['shipment_product_class_id'] as $relation_index => $shipment_product_class_id) {
                    $arrUpdateQuantity[$shipment_product_class_id] += $arritems['shipment_quantity'][$relation_index];
                }
            }

            $arrProductsClass = $objFormParam->getValue('product_class_id');
            $arrProductsQuantity = $objFormParam->getValue('quantity');
            foreach ($arrProductsClass as $relation_key => $product_class_id) {
                $arrQuantity['quantity'][$relation_key] = $arrUpdateQuantity[$product_class_id];
            }
// added
    } else {
            // 配送先が1つ
            $arrProductsClass = $objFormParam->getValue('product_class_id');
            $arrProductsQuantity = $objFormParam->getValue('quantity');
            foreach ($arrProductsClass as $relation_key => $product_class_id) {
                $arrUpdateQuantity[$product_class_id] = $arrProductsQuantity[$relation_key];
            }

            foreach ($arrShipmentsItems as $item_index => $arritems) {
                foreach ($arritems['shipment_product_class_id'] as $relation_index => $shipment_product_class_id) {
                    $arrQuantity['shipment_quantity'][$item_index][$relation_index] = $arrUpdateQuantity[$shipment_product_class_id];
                }
            }
    }
// added
            $objFormParam->setParam($arrQuantity);
        }
    }
フラット表示 前のトピック | 次のトピック


題名 投稿者 日時
   v2.13.0 管理画面:受注変更画面(複数配送でない)の数量チェックの動作に不具合がある。 sumida 2013/10/7 15:57
     Re: v2.13.0 管理画面:受注変更画面(複数配送でない)の数量チェックの動作に不具合がある。 sumida 2013/10/7 23:06
       Re: v2.13.0 管理画面:受注変更画面(複数配送でない)の数量チェックの動作に不具合がある。 sumida 2013/10/8 18:19
         Re: v2.13.0 管理画面:受注変更画面(複数配送でない)の数量チェックの動作に不具合がある。 sumida 2013/10/10 17:23
     Re: v2.13.0 管理画面:受注変更画面(複数配送でない)の数量チェックの動作に不具合がある。 sumida 2013/10/10 22:11
       Re: v2.13.0 管理画面:受注変更画面(複数配送でない)の数量チェックの動作に不具合がある。 sumida 2013/10/11 18:30
       » Re: v2.13.0 管理画面:受注変更画面(複数配送でない)の数量チェックの動作に不具合がある。 sumida 2013/10/12 14:54
           Re: v2.13.0 管理画面:受注変更画面(複数配送でない)の数量チェックの動作に不具合がある。 sumida 2014/1/9 15:12

 



ログイン


EC-CUBE公式 Amazon Payプラグイン

統計情報

総メンバー数は88,865名です
総投稿数は109,999件です

投稿数ランキング

1
seasoft
7367
2
468
3217
3
AMUAMU
2712
4
nanasess
2313
5
umebius
2085
6
yuh
1819
7
h_tanaka
1646
8
red
1570
9
mcontact
1295
10
tsuji
958
11
fukap
907
12
shutta
835
13
tao_s
799
14 ramrun 789
15 karin 689
16 sumida 641
17
homan
633
18 DELIGHT 572
19
patapata
502
20
flealog
485


ネットショップの壺

EC-CUBEインテグレートパートナー

Copyright© EC-CUBE CO.,LTD. All Rights Reserved.