让ecshop批量打印快递单修改方法
2016-09-07 22:02 来源:www.chinab4c.com 作者:ecshop专家
在ecshop网店系统当中,增加批量打印快递单功能,大大方便了用户发货问题。以下是chinab4c提供的开发方法
1.admin\\templates\\order_list.htm,在
<input name="print" type="submit" id="btnSubmit4" value="{$lang.print_order}" class="button" disabled="true" onclick="this.form.target = '_blank'" />
后,添加
<input name="print_shopping" type="submit" id="btnSubmit6" value="批量打印快递单" class="button" disabled="true" onclick="this.form.target = '_blank'" />
2.admin\\order.php,在
/* 去发货 */
elseif (isset($_POST['to_delivery']))
前,添加
//批量打印快递单
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, 0, -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 = array();
$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 = $db->getOne("SELECT * FROM " . $ecs->table("shipping") . " WHERE shipping_id=" . $order['shipping_id']);
if (empty($shipping['shipping_print']))
{
echo $smarty->fetch("str:" . $shipping['shipping_print']);
}
else
{
$shipping_code = $db->getOne("SELECT shipping_code FROM " . $ecs->table('shipping') . " WHERE shipping_id=" . $order['shipping_id']);
if ($shipping_code){
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;
}
3.在languages\\zh_cn\\shipping中对应的php文件里
$_LANG['shipping_print'] =‘’;
这一句,将‘’中的内容样式修改过来就好了。至于取页面样式,只要在对应页面Ctrl+S一下就好了。
(责任编辑:chinab4c) |
最近更新
常用插件
- ecshop2.7.2生成虚拟订单2.
以前我们开发过ecshop下的虚拟订单,就是客户在访问的时候,会自动生...
- ecshop2.7.1邮件发送插件
ecshop2.7.1邮件发送插件:该插件主要的开发思想是源于ecshop短信发送系统...
- ecshop最小购买数量控制插
ecshop最小购买数量控制插件,这个插件主要是为我们提供一个十分方便...
- ecshop二次开发商品购买增
图片1香...
- ecshop没登陆情况下订单查
ecshop没登陆情况下订单查询插件,主要是针对ecshop在没有登陆的情况下...
ecshop热门问答
ecshop热门资料
ecsho链接
ecshopfirefoxe
ecshopGocnBuy
后台ajax
ecshop数码产品
ecshop多用戶商城
ecshop商品货号
column_left.php
ecshop搜索引擎
ecshopItems
ecshop您的购物车中没有商品
ecshopgoods
ecshop分类乱了
ecshop独立模版
ecshop档案
ecshop打折信息
手机模板
ecshopDIY
ecshop财付通
ecshop改善
ecshopTencent
ecshopfont
ecshop老人
ecshop货号已存在
ecshop正品承诺
ecshop图片调整
ecshop上半身
ecshop客服中心
ecshopaljr
ecshopcoffee