首先,修改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批量打印快递单的方法所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)