[Svn-src-all:4337] [version-2_13-dev 23251] #2437 v2.13.0 受注情報変更画面に使途不明・値未設定項目(shipping_product_quantity)がある。->修正いたしました。

undertree admin @ mail.ec-cube.net
2013年 10月 24日 (木) 19:49:17 JST


Subversion committed to /home/svn/open 23251
http://svn.ec-cube.net/open_trac/changeset/23251
┌────────────────────────────┐
│更新者 :  undertree                                    │
│更新日時:  2013-10-24 19:49:16 +0900 (木, 24 10月 2013)│
└────────────────────────────┘

Log:
--------------------------------------------------------
#2437 v2.13.0 受注情報変更画面に使途不明・値未設定項目(shipping_product_quantity)がある。->修正いたしました。

Changed:                      [U:修正,A:追加,D:削除]
--------------------------------------------------------
U   branches/version-2_13-dev/data/Smarty/templates/admin/order/edit.tpl
U   branches/version-2_13-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php

変更: branches/version-2_13-dev/data/Smarty/templates/admin/order/edit.tpl
===================================================================
--- branches/version-2_13-dev/data/Smarty/templates/admin/order/edit.tpl	2013-10-24 10:15:38 UTC (rev 23250)
+++ branches/version-2_13-dev/data/Smarty/templates/admin/order/edit.tpl	2013-10-24 10:49:16 UTC (rev 23251)
@@ -491,8 +491,6 @@
             <!--{if $arrForm.shipping_quantity.value > 1}-->
                 <h2>届け先商品情報&nbsp;<a class="btn-normal" href="javascript:;" name="add_product" onclick="eccube.openWindow('<!--{$smarty.const.ROOT_URLPATH}--><!--{$smarty.const.ADMIN_DIR}-->order/product_select.php?order_id=<!--{$arrForm.order_id.value|h}-->&shipping_id=<!--{$shipping_index}-->', 'search', '615', '500', {menubar:'no'}); return false;">商品の追加</a>
                 </h2>
-                <!--{assign var=product_quantity value="shipping_product_quantity"}-->
-                <input type="hidden" name="<!--{$product_quantity}-->[<!--{$shipping_index}-->]" value="<!--{$arrShipping[$product_quantity]|h}-->" />
 
                 <!--{if count($arrShipping.shipment_product_class_id) > 0}-->
                     <table class="list order-edit-products">
@@ -543,8 +541,7 @@
                 <!--{/if}-->
             <!--{else}-->
                 <!-- 配送先が1つでも、shipment_itemを更新するために必要 -->
-                <!--{assign var=product_quantity value="shipping_product_quantity"}-->
-                <input type="hidden" name="<!--{$product_quantity}-->[<!--{$shipping_index}-->]" value="<!--{$arrShipping[$product_quantity]|h}-->" />
+
                 <!--{section name=item loop=$arrShipping.shipment_product_class_id|@count}-->
                     <!--{assign var=item_index value="`$smarty.section.item.index`"}-->
                             <!--{assign var=key value="shipment_product_class_id"}-->

変更: branches/version-2_13-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php
===================================================================
--- branches/version-2_13-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php	2013-10-24 10:15:38 UTC (rev 23250)
+++ branches/version-2_13-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php	2013-10-24 10:49:16 UTC (rev 23251)
@@ -418,7 +418,6 @@
         $objFormParam->addParam('お届け日(月)', 'shipping_date_month', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK'));
         $objFormParam->addParam('お届け日(日)', 'shipping_date_day', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK'));
         $objFormParam->addParam('お届け日', 'shipping_date', STEXT_LEN, 'KVa', array('SPTAB_CHECK', 'MAX_LENGTH_CHECK'));
-        $objFormParam->addParam('配送商品数量', 'shipping_product_quantity', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK'));
 
         $objFormParam->addParam('商品規格ID', 'shipment_product_class_id', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK'));
         $objFormParam->addParam('商品コード', 'shipment_product_code');
@@ -496,7 +495,6 @@
          * $arrProductQuantity[$shipping_id] = お届け先ごとの配送商品数量
          */
         $arrShipmentForm = array();
-        $arrProductQuantity = array();
         $arrShippingIds = $objFormParam->getValue('shipping_id');
         foreach ($arrShippingIds as $shipping_id) {
             $item_index = 0;
@@ -509,11 +507,9 @@
                 $item_index++;
             }
             // お届け先ごとの配送商品数量を設定
-            $arrProductQuantity[$shipping_id] = count($arrShipmentItem[$shipping_id]);
         }
 
         $objFormParam->setParam($arrShipmentForm);
-        $objFormParam->setValue('shipping_product_quantity', $arrProductQuantity);
 
         // 受注商品の数量を変更
         $arrDest = array();
@@ -566,17 +562,14 @@
          * $arrShipmentItem['shipment_(key)'][$shipping_id][$item_index] = 値
          * $arrProductQuantity[$shipping_id] = お届け先ごとの配送商品数量
          */
-        $arrProductQuantity = array();
         $arrShipmentItem = array();
         foreach ($arrShippings as $shipping_id => $arrShipping) {
-            $arrProductQuantity[$shipping_id] = count($arrShipping['shipment_item']);
             foreach ($arrShipping['shipment_item'] as $item_index => $arrItem) {
                 foreach ($arrItem as $item_key => $item_val) {
                     $arrShipmentItem['shipment_' . $item_key][$shipping_id][$item_index] = $item_val;
                 }
             }
         }
-        $objFormParam->setValue('shipping_product_quantity', $arrProductQuantity);
         $objFormParam->setParam($arrShipmentItem);
 
         /*
@@ -1088,7 +1081,7 @@
     public function setProductsQuantity(&$objFormParam)
     {
         $arrShipmentsItems = $objFormParam->getSwapArray(array('shipment_product_class_id','shipment_quantity'));
-        
+
         // 配送先が存在する時のみ、商品個数の再設定を行います
         if(!SC_Utils_Ex::isBlank($arrShipmentsItems)) {
             foreach ($arrShipmentsItems as $arritems) {




Svn-src-all メーリングリストの案内