名称: member_orders 

功能: 读取当前会员订单列表

示例:

{if( $member_orders )}
{loop $member_orders $k $v}
<div class="panel panel-info">
	<div class="panel-heading">
		<h5 class="panel-title">
			编号:{$v['orders_sn']}  
			时间:{php}echo date('Y-m-d H:i:s', $v['orders_info']['atime']);{/php}  
			物流编号:<a href="https://www.baidu.com/s?wd={$v['orders_info']['tracking_no']}" target="_blank">{$v['orders_info']['tracking_no']?$v['orders_info']['tracking_no']:'-'}</a>  
			<span class="pull-right">
				{if($v['orders_info']['status']==0)}
				<a href="shopping-checkout.html?orders_id={$v['orders_info']['orders_id']}" target="_blank" class="">立即结算</a>
				{/if}
			</span>
		</h5>
	</div>
	<div class="panel-body">
		<table class="table table-bordered">
			<tr>
				<th>商品</th>
				<th>单价</th>
				<th>数量</th>
				<th>金额</th>
				<th>合计</th>
				<th>状态</th>
			</tr>
			{loop $v['goods_info'] $k1 $v1}
			<tr>
				<td>{$v1['goods_name']}</td>
				<td>${$v1['goods_price']}</td>
				<td>{$v1['goods_num']}</td>
				<td>${php}echo round($v1['goods_price']*$v1['goods_num'], 4);{/php}</td>
				{if($k1==0)}
				<td rowspan="{php}echo count($v['goods_info']);{/php}">${$v['orders_info']['orders_money']}</td>
				<td rowspan="{php}echo count($v['goods_info']);{/php}">{$v['orders_info']['status_name']}</td>
				{/if}
			</tr>
			{/loop}
			{if($v['orders_info']['address'])}
			<tr><td colspan="6">
				收货信息:{$v['orders_info']['address']['username']} ({$v['orders_info']['address']['phone']}) {$v['orders_info']['address']['address']}
			</td></tr>
			{/if}
		</table>
	</div>
</div>
{/loop}
{else}
未查找到您的订单!
{/if}
 
# 支持HTTP-AJAX方式请求
http://esite.likun.work/?act=member_orders&ajax=yes

 

数据格式打印:

Array
(
    [3] => Array
        (
            [orders_id] => 3
            [orders_info] => Array
                (
                    [orders_id] => 3
                    [user_id] => 1
                    [pay_type] => paypal
                    [pay_key] => 
                    [pay_time] => 0
                    [orders_money] => 4600
                    [pay_money] => 4600
                    [status] => 0
                    [notes] => 仔细点0.0001aad
                    [atime] => 1529934731
                    [address_id] => 3
                    [tracking_no] => 
                    [utime] => 1532174978
                    [address] => Array
                        (
                            [id] => 3
                            [user_id] => 1
                            [username] => ebers
                            [line1] => 罗湖区水贝
                            [line2] => 松泉公寓A栋
                            [city] => 深圳市
                            [state] => 广东省
                            [phone] => 13058084926
                            [postalCode] => 435411
                            [countryCode] => CN
                            [is_default] => 0
                            [address] => CN 广东省 深圳市 罗湖区水贝 松泉公寓A栋
                        )

                    [status_name] => 待付款
                )

            [goods_info] => Array
                (
                    [0] => Array
                        (
                            [orders_id] => 3
                            [goods_id] => 6
                            [goods_name] => 哥弟女装2018夏季新款两件式吊带衬衫圆领T恤A300275
                            [goods_price] => 350
                            [goods_weight] => 0.18
                            [goods_num] => 6
                            [exts] => []
                        )

                    [1] => Array
                        (
                            [orders_id] => 3
                            [goods_id] => 2
                            [goods_name] => 【预售】哥弟女装2018夏季新款字母印花短袖T恤A300318
                            [goods_price] => 250
                            [goods_weight] => 0.18
                            [goods_num] => 10
                            [exts] => []
                        )

                )

            [member_info] => Array
                (
                    [user_id] => 1
                    [email] => 973432436@qq.com
                    [username] => ebers
                    [phone] => 
                    [reg_time] => 1528293984
                    [last_login] => 1582745286
                    [login_count] => 33
                    [status] => 0
                )

            [site_info] => Array
                (
                    [site_id] => 2
                    [weight_unit] => Kg
                    [unit_freight] => 0
                    [basic_freight] => 0
                    [free_freight] => 0
                )

            [orders_sn] => S2O000003E
            [orders_atime] => 1582749265
            [weight_total] => 2.88
            [v] => Array
                (
                    [orders_id] => 3
                    [goods_id] => 2
                    [goods_name] => 【预售】哥弟女装2018夏季新款字母印花短袖T恤A300318
                    [goods_price] => 250
                    [goods_weight] => 0.18
                    [goods_num] => 10
                    [exts] => []
                )

            [k] => 1
            [freight] => 0
            [pay_money] => 4600
        )
)