私人领地

ecshop订单-》 订单状态

已确认,已发货,已付款

 

语言包

/* 订单状态 */
$_LANG['os'][OS_UNCONFIRMED] = '未确认';
$_LANG['os'][OS_CONFIRMED] = '已确认';  //确认是有效订单
$_LANG['os'][OS_SPLITED] = '已确认';    //确认收货
$_LANG['os'][OS_SPLITING_PART] = '已确认';
$_LANG['os'][OS_CANCELED] = '已取消';
$_LANG['os'][OS_INVALID] = '无效';
$_LANG['os'][OS_RETURNED] = '退货';

$_LANG['ss'][SS_UNSHIPPED] = '未发货';
$_LANG['ss'][SS_PREPARING] = '配货中';
$_LANG['ss'][SS_SHIPPED] = '已发货';
$_LANG['ss'][SS_RECEIVED] = '收货确认';
$_LANG['ss'][SS_SHIPPED_PART] = '已发货(部分商品)';
$_LANG['ss'][SS_SHIPPED_ING] = '配货中'; // 已分单

$_LANG['ps'][PS_UNPAYED] = '未付款';
$_LANG['ps'][PS_PAYING] = '付款中';
$_LANG['ps'][PS_PAYED] = '已付款';

php输出   L('os'),L('ss'),L('ps')

L('os') 输出:Array ( [0] => 未确认 [1] => 已确认 [5] => 已确认 [6] => 已确认 [2] => 已取消 [3] => 无效 [4] => 退货 )

L('ss') 输出:Array ( [0] => 未发货 [3] => 配货中 [1] => 已发货 [2] => 收货确认 [4] => 已发货(部分商品) [5] => 配货中 )

L('ps') 输出:Array ( [0] => 未付款 [1] => 付款中 [2] => 已付款 )   ps

hmtl页面引用

{$lang.ps[$status]},或 $order['shipping_status_text'] = $_LANG['ss'][$order['shipping_status']];

 

php文件

$os = L('os');
		$ss = L('ss');
		$ps = L('ps');

$status_text = $ps[$orders[$k]['pay_status']];

 

订单状态未确认取消确认已付款配货中已发货已收货退货
order_status 0 2 1 1 1 5 5 4
shipping_status 0 0 0 0 3 1 2 0
pay_status 0 0 0 2 2 2 2 0

完美引用

php

require_once(ROOT_PATH . 'languages/' .$_CFG['lang']. '/admin/order.php');

$smarty->assign('lang',   $_LANG);

html

{$lang.ps[$order.pay_status]}

posted @ 2015-11-25 17:30  狂奔的蜗牛Snails  阅读(426)  评论(0编辑  收藏  举报