やってみました。たぶん、いけると思います。
data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php
$this->arrForm = $objFormParam->getFormParamList();
$this->arrAllShipping = $objFormParam->getSwapArray(array_merge($this->arrShippingKeys, $this->arrShipmentItemKeys));
// added
$arrOrderIndex = array();
// お届け先が1口
if ($objFormParam->getValue('shipping_quantity') <= 1) {
// 受注情報の商品
foreach($objFormParam->getValue('product_class_id') as $order_index => $orderItem) {
// お届け先
foreach($objFormParam->getValue('shipment_product_class_id') as $shipment) {
// お届け先の商品
foreach($shipment as $shipment_index => $shipmentItem) {
// 同じ商品
if ($orderItem == $shipmentItem) {
$arrOrderIndex[$order_index] = $shipment_index;
}
}
}
}
}
$this->arrOrderIndex = $arrOrderIndex;
// added
$this->top_shipping_id = array_shift((array_keys($this->arrAllShipping)));
$this->arrDelivTime = SC_Helper_Delivery_Ex::getDelivTime($objFormParam->getValue('deliv_id'));
$this->tpl_onload .= $this->getAnchorKey($objFormParam);
if ($arrValuesBefore['payment_id'])
$this->arrPayment[$arrValuesBefore['payment_id']] = $arrValuesBefore['payment_method'];
data/Smarty/templates/admin/order/edit.tpl
追記:お届け先が1口で、追加登録した住所へお届けする受注情報の場合、数量の変更ができない不具合の修正を加えました。(3/20)
// changed
function quantityCopyForSingleShipping(shipping_index, product_index, shipment_product_index){
var product_index = parseInt(product_index);
var input_quantity = $('input[name^="quantity[' + product_index + ']"]').val();
$('input[name^="shipment_quantity[' + shipping_index + '][' + shipment_product_index + ']"]').val(input_quantity);
}
// changed
<table class="list order-edit-products">
<tr>
<th class="id">商品コード</th>
<th class="name">商品名/規格1/規格2</th>
<th class="price">単価</th>
<th class="qty">数量</th>
<th class="price">税込み価格</th>
<th class="price">小計</th>
</tr>
<!--{section name=cnt loop=$arrForm.quantity.value}-->
<!--{assign var=product_index value="`$smarty.section.cnt.index`"}-->
<!--{* added *}-->
<!--{if $arrForm.shipping_quantity.value > 1}-->
<!--{assign var=shipping_product_index value="`$smarty.section.cnt.index`"}-->
<!--{else}-->
<!--{assign var=shipping_product_index value="`$arrOrderIndex[$smarty.section.cnt.index]`"}-->
<!--{/if}-->
<!--{* added *}-->
<tr>
<td class="center">
<!--{$arrForm.product_code.value[$product_index]|h}-->
<input type="hidden" name="product_code[<!--{$product_index}-->]" value="<!--{$arrForm.product_code.value[$product_index]|h}-->" id="product_code_<!--{$product_index}-->" />
</td>
<td class="center">
<!--{$arrForm.product_name.value[$product_index]|h}-->/<!--{$arrForm.classcategory_name1.value[$product_index]|default:"(なし)"|h}-->/<!--{$arrForm.classcategory_name2.value[$product_index]|default:"(なし)"|h}-->
<input type="hidden" name="product_name[<!--{$product_index}-->]" value="<!--{$arrForm.product_name.value[$product_index]|h}-->" id="product_name_<!--{$product_index}-->" />
<input type="hidden" name="classcategory_name1[<!--{$product_index}-->]" value="<!--{$arrForm.classcategory_name1.value[$product_index]|h}-->" id="classcategory_name1_<!--{$product_index}-->" />
<input type="hidden" name="classcategory_name2[<!--{$product_index}-->]" value="<!--{$arrForm.classcategory_name2.value[$product_index]|h}-->" id="classcategory_name2_<!--{$product_index}-->" />
<br />
<!--{if $arrForm.shipping_quantity.value <= 1}-->
<!--{* changed *}--> <a class="btn-normal" href="java script:;" name="change" onclick="eccube.openWindow('<!--{$smarty.const.ROOT_URLPATH}--><!--{$smarty.const.ADMIN_DIR}-->order/product_select.php?no=<!--{$shipping_product_index}-->&order_id=<!--{$arrForm.order_id.value|h}-->&shipping_id=<!--{$top_shipping_id}-->', 'search', '615', '500', {menubar:'no'}); return false;">変更</a>
<!--{if count($arrForm.quantity.value) > 1}-->
<!--{* changed *}--> <a class="btn-normal" href="java script:;" name="delete" onclick="eccube.setValue('delete_no', <!--{$shipping_product_index}-->, 'form1'); eccube.setValue('select_shipping_id', '<!--{$top_shipping_id}-->', 'form1'); eccube.setModeAndSubmit('delete_product','anchor_key','order_products'); return false;">削除</a>
<!--{/if}-->
<!--{/if}-->
<input type="hidden" name="product_type_id[<!--{$product_index}-->]" value="<!--{$arrForm.product_type_id.value[$product_index]|h}-->" id="product_type_id_<!--{$product_index}-->" />
<input type="hidden" name="product_id[<!--{$product_index}-->]" value="<!--{$arrForm.product_id.value[$product_index]|h}-->" id="product_id_<!--{$product_index}-->" />
<input type="hidden" name="product_class_id[<!--{$product_index}-->]" value="<!--{$arrForm.product_class_id.value[$product_index]|h}-->" id="product_class_id_<!--{$product_index}-->" />
<input type="hidden" name="point_rate[<!--{$product_index}-->]" value="<!--{$arrForm.point_rate.value[$product_index]|h}-->" id="point_rate_<!--{$product_index}-->" />
</td>
<td class="center">
<!--{assign var=key value="price"}-->
<span class="attention"><!--{$arrErr[$key][$product_index]}--></span>
<input type="text" name="<!--{$key}-->[<!--{$product_index}-->]" value="<!--{$arrForm[$key].value[$product_index]|h}-->" size="6" class="box6" maxlength="<!--{$arrForm[$key].length}-->" style="<!--{$arrErr[$key][$product_index]|sfGetErrorColor}-->" id="<!--{$key}-->_<!--{$product_index}-->" /> 円
</td>
<td class="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('<!--{$top_shipping_id}-->', '<!--{$product_index}-->', '<!--{$shipping_product_index}-->')" />
</td>