ECSHOP二次开发文档

http://home.phpchina.com/space.php?uid=88872&do=blog&id=183234

ecshop文件架构说明
           
$ui_arr = array(’register’, ‘login’, ‘profile’, ‘order_list’,‘modify‘,’order_detail’, ‘address_list’,‘collection_list’,'message_list’, ‘tag_list’, ‘get_password’,‘reset_password’, ‘booking_list’, ‘add_booking’,‘account_raply’,'account_deposit’, ‘account_log’, ‘account_detail’,‘act_account’, ‘pay’, ‘default’, ‘bonus’, ‘group_buy’,‘group_buy_detail’, ‘affiliate’,‘comment_list’,'validate_email’,'track_packages’, ‘transform_points’);
2、在下面所示代码中,增加    $smarty->assign(’allow_to_modify’,1);

if ($order['order_amount'] > 0 && $order['pay_status'] ==PS_UNPAYED && $order['shipping_status'] == SS_UNSHIPPED)
     {
         $payment_list = available_payment_list(false, 0, true);
          $smarty->assign(’allow_to_modify’,1);
3、在“//删除订单中的商品”的方面,加入下载代码:

elseif($action==’modify’){
            function multiArraySearch($needle, $haystack){
                                $value = false;
                                $x = 0;
                                foreach($haystack as $temp){
                                         // print_r($temp);
                                          $search = array_search($needle, $temp);
                                          if (strlen($search) > 0 && $search >= 0){
                                            $value[0] = $x;
                                            //$value[1] = $search;
                                              }
                                          $x++;
                                    }
                            return $value;
           }
            include_once(ROOT_PATH . ‘includes/lib_transaction.php’);
             include_once(ROOT_PATH . ‘includes/lib_payment.php’);
             include_once(ROOT_PATH . ‘includes/lib_order.php’);
             include_once(ROOT_PATH . ‘includes/lib_clips.php’);
             if($_REQUEST['do']=="del"){
                 $oid=$_REQUEST['oid'];
                 $gid=$_REQUEST['bid'];
                 $sql="select goods_price,goods_number  from ".$ecs->table("order_goods")." where  goods_id=$gid";
                 $result=$db->getrow($sql);
                 $order = get_order_detail($oid, $user_id);//取得订单
                 $sql="delete from ".$ecs->table("order_goods")."  where goods_id=$gid and order_id=$oid";//删除商品
                $db->query($sql);
                 $sql="select configure from  ".$ecs->table("shipping_area")." where shipping_id=".$order['shipping_id'];
                 $shipping_fee=$db->getrow($sql);
                 $tempa=unserialize($shipping_fee['configure']);
                 $shipping=multiArraySearch("free_money",$tempa);
                 $free_money=$tempa[$shipping[0]]['value'];//找出免运费的额度
                 $market_price=$order['goods_amount']-$result['goods_price']*$result['goods_number'];
                 $inv_id=array_search($order['inv_type'],$GLOBALS['_CFG']['invoice_type']['type']);
                 $rate= floatval($GLOBALS['_CFG']['invoice_type']['rate'][$inv_id])/100;
                 $tax=$order['tax']-($result['goods_price']*$result['goods_number'])*$rate;
                 $addpay_fee=pay_fee($order['pay_id'],$result['goods_price']*$result['goods_number']);//删除的支付费用
                 $pay_fee=$order['pay_fee']-$addpay_fee;
                 $order_amount=$market_price-$discount+$tax+$pay_fee;
                 $shipping_fee=$order['shipping_fee'];
                  if($market_price>=$free_money){
                             $order_amount=$order_amount-$shipping_fee;
                             $shipping_fee="0.00";
                         }else{
                             if($shipping_fee<=0){
                                     $shipping=multiArraySearch("basic_fee",$tempa);
                                     $shipping_fee=$tempa[$shipping[0]]['value'];//找出基本运费的
                                     $order_amount=$order_amount+$shipping_fee;
                             }
                 }

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
ECShop 是一款基于PHP的开源电子商务系统,具有操作简便、功能丰富的特点。需求分析文档是对ECShop系统进行需求分析的指南,它对系统的功能、性能、安全等方面进行详细的描述和说明。 首先,需求分析文档应包含系统的功能需求。这包括系统的基本功能,如用户注册、商品浏览、购物车管理、订单管理等。还应包括系统的拓展功能,如搜索功能、商品推荐功能、评价功能等,以满足用户的不同需求。 其次,需求分析文档应包含系统的性能需求。这包括系统的响应时间、并发用户数、数据处理能力等。通过明确性能需求,可以保证系统在面对大量用户访问时仍能保持稳定的运行状态。 再次,需求分析文档应包含系统的安全需求。这包括用户数据的安全性、支付信息的保密性等。通过合理的安全需求设计,可以提高系统的安全性,保护用户的隐私信息,增加用户的信任感。 此外,需求分析文档还应包含系统的界面需求。这包括系统的界面风格、布局、色彩搭配等。良好的界面设计可以提升用户体验,增加用户的使用欲望。 最后,需求分析文档还应包含测试需求。包括系统的单元测试、功能测试、性能测试等。通过合理的测试需求设计,可以保证系统在上线之前的质量和稳定性。 总之,需求分析文档ECShop系统的各个方面进行了详细的描述和说明,是系统设计和开发的重要依据。通过需求分析文档,可以确保系统在满足用户需求的同时,具备稳定、安全、易用的特点。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值