ecshop批量打印快递单的方法

ecshop批量打印快递单的方法,第1张

概述在ecshop后台系统中,在订单的详细页面,可以打印快递单,是一些和ecshop订单相关的资料.在配送方式列表中,你可以设置他的打印模板. 首先,修改order_list.htm加上一按扭. <input name="print_shopping" type="submit" id="btnSubmit5" value="快速打印快递&qu… 在ecshop后台系统中,在订单的详细页面,可以打印快递单,是一些和ecshop订单相关的资料.在配送方式列表中,你可以设置他的打印模板.

首先,修改order_List.htm加上一按扭.

<input name="print_shopPing" type="submit" ID="btnsubmit5" value="快速打印快递" class="button" Disabled="true" onclick="this.form.target = '_blank'" />用来批量打印快递单.

在ecshop后台的order.PHP中加入

elseif (isset($_POST['print_shopPing'])){

$region_array = array();
$region_ID = !empty($_CFG['shop_country']) ? $_CFG['shop_country'] . ',' : '';
$region_ID .= !empty($_CFG['shop_province']) ? $_CFG['shop_province'] . ',' : '';
$region_ID .= !empty($_CFG['shop_city']) ? $_CFG['shop_city'] . ',' : '';
$region_ID = substr($region_ID,-1);
$region = $db->getAll("SELECT region_ID,region_name FROM " . $ecs->table("region") . " WHERE region_ID IN ($region_ID)");
if (!empty($region))
{
foreach($region as $region_data)
{
$region_array[$region_data['region_ID']] = $region_data['region_name'];
}
}
$smarty->assign('shop_name',$_CFG['shop_name']);
$smarty->assign('province',$region_array[$_CFG['shop_province']]);
$smarty->assign('city',$region_array[$_CFG['shop_city']]);
$smarty->assign('shop_address',$_CFG['shop_address']);
$smarty->assign('service_phone',$_CFG['service_phone']);
//以上是系统参数
$order_sn_List = explode(',',$_POST['order_ID']);
foreach ($order_sn_List as $order_sn)
{
/* 取得订单信息 */
$order = order_info(0,$order_sn);
$smarty -> assign('order',$order);
$shipPing_print = $db->getone("SELECT shipPing_print FROM " . $ecs->table("shipPing") . " WHERE shipPing_ID=" . $order['shipPing_ID']);
if (!empty($shipPing_print))
{
echo $smarty->fetch("str:$shipPing_print");
}
else
{
$shipPing_code = $db->getone("SELECT shipPing_code FROM " . $ecs->table('shipPing') . " WHERE shipPing_ID=" . $order['shipPing_ID']);
include_once(ROOT_PATH . 'includes/modules/shipPing/' . $shipPing_code . '.PHP');
if (!empty($_LANG['shipPing_print']))
{
echo $smarty->fetch("str:$_LANG[shipPing_print]");
}
else
{
echo $_LANG['no_print_shipPing'];
}
}
}

exit;
}
总结

以上是内存溢出为你收集整理的ecshop批量打印快递单的方法全部内容,希望文章能够帮你解决ecshop批量打印快递单的方法所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zz/1005757.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-22
下一篇 2022-05-22

发表评论

登录后才能评论

评论列表(0条)

保存