最土团购添加货到付款操作Word文档下载推荐.docx

上传人:b****2 文档编号:4760968 上传时间:2023-05-04 格式:DOCX 页数:11 大小:19.44KB
下载 相关 举报
最土团购添加货到付款操作Word文档下载推荐.docx_第1页
第1页 / 共11页
最土团购添加货到付款操作Word文档下载推荐.docx_第2页
第2页 / 共11页
最土团购添加货到付款操作Word文档下载推荐.docx_第3页
第3页 / 共11页
最土团购添加货到付款操作Word文档下载推荐.docx_第4页
第4页 / 共11页
最土团购添加货到付款操作Word文档下载推荐.docx_第5页
第5页 / 共11页
最土团购添加货到付款操作Word文档下载推荐.docx_第6页
第6页 / 共11页
最土团购添加货到付款操作Word文档下载推荐.docx_第7页
第7页 / 共11页
最土团购添加货到付款操作Word文档下载推荐.docx_第8页
第8页 / 共11页
最土团购添加货到付款操作Word文档下载推荐.docx_第9页
第9页 / 共11页
最土团购添加货到付款操作Word文档下载推荐.docx_第10页
第10页 / 共11页
最土团购添加货到付款操作Word文档下载推荐.docx_第11页
第11页 / 共11页
亲,该文档总共11页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

最土团购添加货到付款操作Word文档下载推荐.docx

《最土团购添加货到付款操作Word文档下载推荐.docx》由会员分享,可在线阅读,更多相关《最土团购添加货到付款操作Word文档下载推荐.docx(11页珍藏版)》请在冰点文库上搜索。

最土团购添加货到付款操作Word文档下载推荐.docx

<

inputtype="

hidden"

order_id"

{$order_id}"

/>

allmoney"

{$total_money}"

service"

imgsrc="

/static/css/i/other.gif"

br/>

submit"

formbuttongotopay"

确认订单,货到付"

/form>

第2步:

新建文件wtpay.php,存放在order目录下,代码如下:

?

php

require_once(dirname(dirname(__FILE__)).'

/app.php'

);

need_login();

if(is_post()){

$order_id=abs(intval($_POST['

order_id'

]));

}else{

if($_GET['

id'

]=='

charge'

){

redirect(WEB_ROOT.'

/credit/index.php'

}

$order_id=$id=abs(intval($_GET['

}

if(!

$order_id||!

($order=Table:

:

Fetch('

order'

$order_id))){

redirect(WEB_ROOT.'

/index.php'

if($order['

user_id'

]!

=$login_user['

]){

redirect(WEB_ROOT."

/team.php?

id={$order['

team_id'

]}"

$team=Table:

team'

$order['

]);

team_state($team);

if(is_post()&

&

$_POST['

paytype'

]){

$uarray=array('

=>

pay_getservice($_POST['

]));

Table:

UpdateCache('

$order_id,$uarray);

$order=Table:

$order_id);

$order['

]=pay_getservice($_POST['

if($_POST['

]!

='

&

$team['

team_type'

seconds'

($order['

origin'

]>

$login_user['

money'

])

option_yes('

creditseconds'

$need_money=ceil($order['

]-$login_user['

Session:

Set('

error'

"

秒杀项目仅可以使用余额付款,您的余额不足,还需要充值{$need_money}元才可以完成秒杀"

redirect(WEB_ROOT."

/credit/charge.php?

money={$need_money}"

//peruserbuycount

if($_POST&

per_number'

0){

$now_count=Table:

Count('

array(

'

$login_user_id,

],

state'

'

pay'

),'

quantity'

$leftnum=($team['

]-$now_count);

if($leftnum<

=0){

Session:

'

您购买本单产品的数量已经达到上限,快去关注一下其他产品吧!

'

redirect(WEB_ROOT."

id={$id}"

//payedorder

){

if(is_get()){

die(includetemplate('

order_pay_success'

));

}else{

redirect(WEB_ROOT."

/order/pay.php?

id={$order_id}"

$total_money=moneyit($_POST['

allmoney'

$service=$_POST['

];

/*generateuniquepay_id*/

if(!

($pay_id=$order['

pay_id'

])){

$randid=strtolower(Utility:

GenSecret(4,Utility:

CHAR_WORD));

$pay_id="

go-{$order['

]}-{$order['

]}-{$randid}"

;

],array(

'

$pay_id,

));

/*noneedpaywheregoodssoldoutorend*/

if($team['

close_time'

notice'

本单产品团购已结束,现在不能进行付款'

now_number'

$team['

maxnumber'

]&

0){

本单产品团购已卖光,现在不能进行付款'

/*end*/

/*creditpay*/

//echo$total_money;

//echo'

//echo$order_id;

$order_id,array(

0,

unpay'

$total_money,

pay_time'

time(),

));

redirect(WEB_ROOT.'

/order/index.php'

第3步:

打开order/index.php,查找“$condition['

]='

”,替换为“$condition[]="

(state!

)"

第4步:

打开order/paybank.php,查找“$payservice=array”,在数组里面添加元素other,最终结果数组里面的内容为“'

alipay'

tenpay'

'

sdopay'

paypal'

bill'

chinabank'

yeepay'

cmpay'

第5步:

打开order/pay.php,查找“elseif($order['

)”,添加与其判断平行的一个elseif判断句话,内容如下:

//货到付款新添加的

elseif($order['

&

){

$total_money=$order['

]*1.01;

if($order['

]<

1000||$order['

]=1000){

$total_money=$order['

]+10;

}if($order['

1000){

}

includetemplate('

order_pay'

第6步:

对数据库操作,修改表order中的state字段,再添加一个值,sql语句如下:

altertable`order`changestatestateenum('

backpay'

)notnulldefault'

第7步:

打开/manage/misc/money.php,查找“$actions=array('

store'

cardstore'

paycharge'

withdraw'

cash'

refund'

”修改为下面一句:

$actions=array('

查找“elseif('

==$s)”,在其上面添加下面一段代码:

elseif('

==$s){

$condition=array('

action'

);

$count=Table:

flow'

$condition);

$summary=Table:

$condition,'

list($pagesize,$offset,$pagestring)=pagestring($count,20);

$flows=DB:

LimitQuery('

condition'

$condition,

ORDERBYidDESC'

offset'

$offset,

size'

$pagesize,

$user_ids=Utility:

GetColumn($flows,'

$admin_ids=Utility:

admin_id'

$users=Table:

user'

array_merge($user_ids,$admin_ids));

manage_misc_money_backpay'

第8步:

打开include/classes/ZFlow.class.php,在

elseif('

==$action){

return'

现金充值'

}

下面添加代码:

货到付款'

第9步:

打开include/function/current.php,查找“'

/manage/misc/money.php?

s=store'

线下充值'

”在其下面一行添加

s=backpay'

第10步:

复制模板manage_misc_money_store.html,将复制后的模板更名为manage_misc_money_backpay.html,然后打开,

把里面要的文字“线下充值”替换为“货到付款”,并将后面的“用户提现”替换为“线下充值”

将“<

ul>

${mcurrent_misc('

)}<

/ul>

”替换为“<

第11步:

打开模板manage_order_index.html,

tdclass="

op"

nowrap>

--{if$one['

ahref="

/ajax/manage.php?

action=orderview&

id={$one['

ajaxlink"

详情<

/a>

--{elseif$one['

action=orderbackpay&

ask="

确认本订单为现金付款?

"

现金<

--{/if}-->

/td>

”替换为

“<

action=ordercash&

nbsp;

确认本订单已经收到货并且付款么?

第12步:

打开ajax/manage.php,找到“elseif('

ordercash'

==$action)”在其下面的“}”后面添加下面一段程序代码:

orderbackpay'

==$action){

need_auth('

$id);

if(!

){

货到付款失败错误代码1"

json(null,'

refresh'

//updateorder

'

));

FetchForce('

$user_id=$order['

$money=floatval($order['

if($money==0||$user_id<

=0){

Session:

货到付款失败错误代码2"

json(null,'

//updateusermoney;

$user=Table:

$user_id);

Table:

$user_id,array(

array("

money+{$money}"

),

/*switchstore|withdraw*/

$direction=($money>

0)?

income'

:

expense'

$action=($money>

sorce'

$money=abs($money);

/*endswtich*/

$u=array(

$user_id,

$money,

direction'

$direction,

$action,

detail_id'

create_time'

);

DB:

Insert('

$u);

ZTeam:

BuyOne($order);

货到付款成功,购买用户:

{$user['

email'

json(null,'

第13步:

打开ajax/manage.php,查找“'

fontcolor="

red"

已付款<

/font>

”这里有两处,都在其下面添加一行代码

货到付款(未付)<

第14步:

打开/manage/order/unpay.php,把

$condition=array(

team_id>

0'

修改为:

"

state!

='

第15步:

打开模板order_index.html,

把“<

td>

--{elseif$teams[$one['

]]['

0}-->

已过期<

--{else}-->

未付款<

”修改为:

tdalign="

center"

第16步:

检查调试程序执行。

用户通过前台来下订单,提交订单,选择付款方式为货到付款,提交以后,用户中心-我的订单-状态显示为“货到付款”

当用快递公司代收或者其它形式收到货款以后,在后台管理-订单-当期订单或者未付订单会显示出来详情和货到付款,点击“货到付款”,会提示二次确定,确定以后,订单就会变成已经付款的订单。

在后台管理-首页-财务,点击货到付款,可以看到此笔收入。

在前台用户中心的地方,我个订单就变成了已付款,

账户信息-帐户余额会显示个人账户的收支状况。

因为时间有限,此修改当中可能存在部分的不完整,但是功能方面没有问题。

幸运编号生成正确,积分生成正确,但是提示是购买生成的积分而没有提示是货到付款生成的积分

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 解决方案 > 学习计划

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2