ecshop虚拟物品人性化购物流程简化,删除“收货人信息”,一商设计更多精彩教程将会陆续更新,感谢二次开发支持关注,本次实例如下图:
修改方法分享:
找到文件include/lib_order.php,查找check_consignee_info函数:
复制内容到剪贴板折叠PHP 代码
-
-
-
-
-
-
-
function check_consignee_info($consignee, $flow_type)
-
{
-
if (exist_real_goods(0, $flow_type))
-
{
-
-
$res = !emptyempty($consignee['email']) &&
-
!emptyempty($consignee['tel']);
-
-
-
-
return $res;
-
}
-
else
-
{
-
-
return !emptyempty($consignee['email']) &&
-
!emptyempty($consignee['tel']);
-
}
-
}
打开文件js/shopping_flow.js,查找check_consignee_info函数:
打开文件flow.php,分别查找2处代码注释或删除:
复制内容到剪贴板折叠PHP 代码
-
$consignee = get_consignee($_SESSION['user_id']);
-
-
-
if (!check_consignee_info($consignee, $flow_type))
-
{
-
-
ecs_header("Location: flow.php?step=consignee\n");
-
exit;
-
}
-
-
$_SESSION['flow_consignee'] = $consignee;
-
$smarty->assign('consignee', $consignee);
继续查找删除:
复制内容到剪贴板折叠PHP 代码
-
$consignee = get_consignee($_SESSION['user_id']);
-
-
-
if (!check_consignee_info($consignee, $flow_type))
-
{
-
-
ecs_header("Location: flow.php?step=consignee\n");
-
exit;
-
}
修改完成,刷新试试,有问题请更新缓存。
(责任编辑:最模板) |