導航:首頁 > 編程語言 > php訂單思路

php訂單思路

發布時間:2023-10-25 02:13:46

php裡面商城訂單查詢代碼怎麼寫

aaeer.com裡面的訂單查詢代碼:
訂單號:
訂單查詢
訂單號:
<input name="ono" type="text" id="ono" width="150" height="20" />//訂單號輸入框<a href="javascript:;" class="k_ajax" rel="{URL:'/portal/cart.php',CMD:'def',ono:$('#ono').val()}">訂單查詢</a> //ajax提交,並獲得訂單詳情。
ajax返回的數據,自己查一下代碼吧。
toymen發表於:11-11-08 22:59 5樓[回復] #Top#toymen
人氣:516
積分:3418
金幣:23620
KC元老
ajax查詢訂單狀態,添加到../portal/cart.php中。
/**
處理訂單反饋信息頁
*/
function king_ajax_def(){
global $king;
// setcookie('KingCMS_Cart',serialize($cart),time()+86400000,$king->config('inst'));$ono=kc_get('ono',2,1);
$array_black=str_split('<>'"%');
if(!$data=$king->db->getRows_one("select ono,oid,nstatus,kname,nnumber,ntotal,kfeedback,eid,nexpress from %s_orders where ono=$ono")){kc_error($king->lang->get('system/error/onoerr'));}
$oid=$data['oid'];
$status=$data['nstatus'];
$s='<table class="k_table_list" cellspacing="0">';$s.='<caption>'.$king->lang->get('portal/cart/prodinfo').'(請牢記您的訂單號,以便支付與查詢!)</caption>';$s.='<tr><th class="w150">'.$king->lang->get('portal/cart/youorders').'</th><td><strong class="red">'.$data['ono'].'</strong></td></tr>';$s.='<tr><th>'.$king->lang->get('portal/cart/prodname').'</th><td>'.$data['kname'].'</td></tr>';$s.='<tr><th>'.$king->lang->get('portal/cart/total').'</th><td>'.$data['nnumber'].'件</td></tr>';$s.='<tr><th>'.$king->lang->get('portal/cart/alltotal').'</th><td>'.number_format($data['ntotal'],2).'</td></tr>';$s.='<tr><th>'.$king->lang->get('portal/cart/rstatus').'</th><td>'.$data['nstatus'].'</td></tr>';$s.='</table>';
$s.='<p></p>';
$s.='<br/>';
$height=0;
if($status<3){
$s.='<p><a href="javascript:;" rel="{URL:''.$king->config('inst').'portal/cart.php',CMD:'payment',ono:'.$ono.',IS:1}" class="k_ajax">'.$king->lang->get('portal/orders/viewmethod').'</a></p>';}
kc_ajax($king->lang->get('portal/cart/myorders'),$s,0,'',500,310+($height*50));}
其中<td>'.$data['nstatus'].'</td></tr>'; 這句輸出的是訂單狀態的id數字,需要轉換為文字,不懂php,自己改吧。
數字對應的文字:
1:交易創建
2:等待買家付款
3:買家付款成功
4:發貨成功
5:確認收貨,交易成功
6:交易關閉,未完成超時關閉
7:修改交易價格成功
8:買家申請退款
9:退款成功
10:退款關閉
11:修改交易價格

閱讀全文

與php訂單思路相關的資料

熱點內容
appstore中的錢怎麼退 瀏覽:495
單片機程序下載後如何運行 瀏覽:475
剛買的阿里雲伺服器怎樣搭建網站 瀏覽:637
公園設計pdf 瀏覽:684
緩解壓力最好的辦法美國 瀏覽:387
前後端系統數據加密解密 瀏覽:194
中國移動營業app怎麼看套餐 瀏覽:205
javastatic數組 瀏覽:950
需要會員管理源碼 瀏覽:415
手機app如何解除加密 瀏覽:167
用雲伺服器還得買個瘦主機 瀏覽:728
如何查看辦公電腦伺服器地址 瀏覽:368
海星雲的伺服器是什麼系統 瀏覽:411
抖音小籠包解壓神器 瀏覽:558
手機下載的源碼在哪裡儲存 瀏覽:846
pdf看三維 瀏覽:406
九宮演算法干什麼用的 瀏覽:907
phpjava性能比較 瀏覽:886
2016會計中級pdf 瀏覽:181
農村信用社app怎麼刪除明細 瀏覽:818