ECSHOP2.7实现补款程序
2009-10-23 12:30 来源:www.chinab4c.com 作者:ecshop专家
<?php
define('IN_ECS', true);
require(dirname(__FILE__) . '/includes/init.php');
require(ROOT_PATH . 'includes/lib_order.php');
if ((DEBUG_MODE & 2) != 2)
{
$smarty->caching = true;
}
if(isset($_REQUEST['act'])&&$_REQUEST['act']){
$act = $_REQUEST['act'];
}else{
$act = 'default';
}
if($act == 'default'){
$payment_list = available_payment_list(1, $cod_fee);
foreach ($payment_list as $key => $payment)
{
if ($payment['is_cod'] == '1')
{
$payment_list[$key]['format_pay_fee'] = '<span id="ECS_CODFEE">' . $payment['format_pay_fee'] . '</span>';
}
/* 如果有易宝神州行支付 如果订单金额大于300 则不显示 */
if ($payment['pay_code'] == 'yeepayszx' && $total['amount'] > 300)
{
unset($payment_list[$key]);
}
/* 如果有余额支付 */
if ($payment['pay_code'] == 'balance')
{
/* 如果未登录,不显示 */
if ($_SESSION['user_id'] == 0)
{
unset($payment_list[$key]);
}
else
{
if ($_SESSION['flow_order']['pay_id'] == $payment['pay_id'])
{
$smarty->assign('disable_surplus', 1);
}
}
}
}
$smarty->assign('payment_list', $payment_list);
$smarty -> display('order_repair.dwt');
}else if($act == 'sub'){
include_once('includes/lib_clips.php');
include_once('includes/lib_payment.php');
$order['order_amount'] = intval($_REQUEST['count']);
$order['order_id'] =1;
$order['order_sn'] = get_order_sn();
$order['pay_id'] = $_REQUEST['payment'];
if ($order['order_amount'] > 0)
{
$payment = payment_info($order['pay_id']);
include_once('includes/modules/payment/' . $payment['pay_code'] . '.php');
$pay_obj = new $payment['pay_code'];
$pay_online = $pay_obj->get_code($order, unserialize_config($payment['pay_config']));
$order['pay_desc'] = $payment['pay_desc'];
$smarty->assign('pay_online', $pay_online);
}
$payment = payment_info($order['pay_id']);
$order['pay_name'] = addslashes($payment['pay_name']);
$smarty -> assign('order',$order);
user_uc_call('add_feed', array($order['order_id'], BUY_GOODS)); //推送feed到uc
unset($_SESSION['flow_consignee']); // 清除session中保存的收货人信息
unset($_SESSION['flow_order']);
unset($_SESSION['direct_shopping']);
$smarty -> display('sub.dwt');
}
?>
相关文章:
来源:中国B4C电子商务
最近更新
常用插件
- ecshop红包修改成满多少减
我们在长期使用ecshop的时候,我们可以发现。ecshop的红包是一个非常强...
- ecshop降价通知登记插件
ecshop降价通知登记插件,主要是为了方便某些客户,对商品价格要求比...
- ecshop通用红包编码
很多时候,为了结合促销,必须扩展一下ecshop的红包功能。ecshop的红包...
- ecshop分类树中统计商品数
最近忙于开发其他项目,在不少朋友不断要求和催促的情况下,做出了该小...
- ecshop购物车功能改进[插件
ecshop购物车功能改进[插件套餐]主要是我们最近开发工作和开发项目中。...