バージョン選択

フォーラム

メニュー

オンライン状況

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

サイト内検索

バグ報告 > 管理機能 > 管理画面:受注情報編集の「商品の追加」で規格がコピーされない。

管理機能

新規スレッドを追加する

フラット表示 前のトピック | 次のトピック
投稿者 スレッド
sumida
投稿日時: 2014/7/5 13:41
対応状況: −−−
仙人
登録日: 2013/2/10
居住地: 広島県呉市ときどき瀬戸内海
投稿: 641
Re: 管理画面:受注情報編集の「商品の追加」で規格がコピーされない。
現象としては、
画面上のshipment_itemを関数getShipmentProducts(LC_Page_Admin_Order_Edit.php)で取得しています。

        $arrShipmentProducts['shipment_classcategory_name1'] = $objFormParam->getValue('shipment_classcategory_name1');
        $arrShipmentProducts['shipment_classcategory_name2'] = $objFormParam->getValue('shipment_classcategory_name2');

ここで、規格がない商品だけの場合、以下の値が空になります。
$arrShipmentProducts['shipment_classcategory_name1'] ['shipping_id']
$arrShipmentProducts['shipment_classcategory_name2'] ['shipping_id']
そのため、最初の投稿のコードだけでは、前詰めにされ1つめの商品に規格が入ってしまいます。
とりあえず、強引ですが、修正案です。

    public function getShipmentProducts(&$objFormParam)
    {
        $arrShipmentProducts['shipment_product_class_id']    = $objFormParam->getValue('shipment_product_class_id');
        $arrShipmentProducts['shipment_product_code']        = $objFormParam->getValue('shipment_product_code');
        $arrShipmentProducts['shipment_product_name']        = $objFormParam->getValue('shipment_product_name');
        $arrShipmentProducts['shipment_classcategory_name1'] = $objFormParam->getValue('shipment_classcategory_name1');
        $arrShipmentProducts['shipment_classcategory_name2'] = $objFormParam->getValue('shipment_classcategory_name2');
        $arrShipmentProducts['shipment_price']               = $objFormParam->getValue('shipment_price');
        $arrShipmentProducts['shipment_quantity']            = $objFormParam->getValue('shipment_quantity');

        foreach ($arrShipmentProducts as $key => $value) {
            if (!is_array($value)) {
                $arrShipmentProducts[$key] = array();
            }
        }
// added
        foreach ($arrShipmentProducts as $key => $value) {
            foreach ($value as $shipping_id => $shipping_value) {
                if (empty($shipping_value)) {
                    // 内容がない場合、空の配列を作る。
                    $shipping_item = count($arrShipmentProducts['shipment_product_class_id'][$shipping_id]);
                    $arrShipmentProducts[$key][$shipping_id] = array();
                    for ($i = 0; $i < $shipping_item; $i++) {
                        $arrShipmentProducts[$key][$shipping_id][] = '';
                    }
                    break;
                }
            }
        }
// added

        return $arrShipmentProducts;
    }


本来は、getValue関数側で対応するのが正解かな?
フラット表示 前のトピック | 次のトピック


題名 投稿者 日時
   管理画面:受注情報編集の「商品の追加」で規格がコピーされない。 sumida 2014/7/4 22:57
     Re: 管理画面:受注情報編集の「商品の追加」で規格がコピーされない。 sumida 2014/7/5 10:17
       Re: 管理画面:受注情報編集の「商品の追加」で規格がコピーされない。 red 2014/7/5 13:33
       » Re: 管理画面:受注情報編集の「商品の追加」で規格がコピーされない。 sumida 2014/7/5 13:41
           Re: 管理画面:受注情報編集の「商品の追加」で規格がコピーされない。 sumida 2014/7/7 15:32
             Re: 管理画面:受注情報編集の「商品の追加」で規格がコピーされない。 sumida 2014/7/7 15:40

 



ログイン


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.