ecshop二次开发后台订单详细页面

2010-03-17 00:03 来源:www.chinab4c.com 作者:admin

     ecshop后台的订单详细页面,存在一定的复杂性,如果需要增加操作步骤,还是非常复杂的一件事情,下面将结合给ecshop订单增加评论相结合,来谈谈ecshop二次开发后台订单详细页面增加操作框的步骤.

  1:order.php的act=edit页面,增加以下动作判断.

   $step_list = array('user', 'goods', 'consignee', 'shipping', 'payment', 'other','replay_comment', 'money','orderzt','orderkt');
   2:order.php的act=edit增加以下

   elseif ('replay_comment' == $step){
  $smarty -> assign('order_id',$_REQUEST['order_id']);

 }

  3:order.php的elseif ($_REQUEST['act'] == 'step_post')

  $step_list = array('user', 'edit_goods', 'add_goods', 'goods','replay_comment', 'consignee', 'shipping', 'payment', 'other', 'money', 'invoice','orderzt','orderkt');

  4:order.php的elseif ($_REQUEST['act'] == 'step_post')

  5:admin\templates\order_step.htm

{elseif $step eq "replay_comment"}
<form name="theForm" action="order.php?act=step_post&step={$step}&order_id={$order_id}&step_act={$step_act}" method="post">
<div class="list-div">
<table cellpadding="3" cellspacing="1">
  <tr>
   <td><strong>内容回复:</strong><textarea name="replay_content" cols="70" rows="2"></textarea></td>
  </tr>
 
</table>
</div>
  <p align="center">
    {if $step_act eq "add"}<input type="button" value="{$lang.button_prev}" class="button" onclick="history.back()" />{/if}
    <input name="{if $step_act eq 'add'}next{else}finish{/if}" type="submit" class="button" value="{if $step_act eq 'add'}{$lang.button_next}{else}{$lang.button_submit}{/if}" />
    <input type="button" value="{$lang.button_cancel}" class="button" onclick="location.href='order.php?act=process&func=cancel_order&order_id={$order_id}&step_act={$step_act}'" />
  </p>
</form>

 6:order.php的elseif ($_REQUEST['act'] == 'step_post')

elseif ('replay_comment' == $step)
    { 
  
  $info = array(
   'admin_id' => $_SESSION['admin_id'], 
   'admin_name'=>$_SESSION['admin_name'],
   'replay_time'=>time(),
   'replay_content'=>$_POST['replay_content'],
  );
  $db -> autoExecute($ecs->table('order_comment'),$info,'UPDATE',"order_id = '$order_id'");
   ecs_header("Location: order.php?act=info&order_id=" . $order_id . "\n");
            exit;
 }

     来源:中国B4C电子商务