求订单导出插件(注可付费)

2016-07-07 14:55 来源:www.chinab4c.com 作者:ecshop专家

求订单导出插件,订单可以按条件查询,如按日,或日期区间查询及导出,或按自己选择的单导出。订单列表里,可以直接双击或点击编辑输入发货单号。可付费,报价请给我发站内信件。如有免费更好。谢谢

回答:
我有,免费的

本人有这个功能,有意向请联系
是根据下载时间来导出订单的,导出格式为excel表格



这个功能我也做过,做个记号....

顶顶,不知道哪位哥哥能给我发下??我邮箱284956067@163.com,谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢

进来学习,不知道有免费的不

我也来报个到 我们也能做

有没有人发一个给我,谢谢

}
elseif ($num < 240)
{
if ($start + 2 <$len)
{
$num = (ord($str{$start}) & 0x1f) << 12;
$num += (ord($str{$start+1}) & 0x3f) << 6;
$num += ord($str{$start+2}) & 0x3f;

$result .=chr($num & 0xff) . chr($num >> 8) ;
}
$start += 3;
}
elseif ($num < 248)
{

if ($start + 3 <$len)
{
$num = (ord($str{$start}) & 0x0f) << 18;
$num += (ord($str{$start+1}) & 0x3f) << 12;
$num += (ord($str{$start+2}) & 0x3f) << 6;
$num += ord($str{$start+3}) & 0x3f;
$result .= chr($num & 0xff) . chr($num >> 8) . chr($num >>16);
}
$start += 4;
}
elseif ($num < 252)
{
if ($start + 4 <$len)
{
/* 不做处理 */
}
$start += 5;
}
else
{
if ($start + 5 <$len)
{
/* 不做处理 */
}
$start += 6;
}
}

}

return $result;
}



/**
* 获取商品类型属性
*
* @param int $cat_id 商品类型ID
*
* @return array
*/
function get_attributes($cat_id = 0)
{
$sql = "SELECT `attr_id`, `cat_id`, `attr_name` FROM " . $GLOBALS['ecs']->table('attribute') . " ";
if (!empty($cat_id))
{
$cat_id = intval($cat_id);
$sql .= " WHERE `cat_id` = '{$cat_id}' ";
}
$sql .= " ORDER BY `cat_id` ASC, `attr_id` ASC ";
$attributes = array();
$query = $GLOBALS['db']->query($sql);
while ($row = $GLOBALS['db']->fetchRow($query))
{
$attributes[$row['attr_id']] = $row['attr_name'];
}
return $attributes;
}

/**
* 设置导出商品字段名
*
* @param array $array 字段数组
* @param array $lang 字段名
*
* @return array
*/
function set_goods_field_name($array, $lang)
{
$tmp_fields = $array;
foreach ($array as $key => $value)
{
if (isset($lang[$value]))
{
$tmp_fields[$key] = $lang[$value];
}
else
{
$tmp_fields[$key] = $GLOBALS['db']->getOne("SELECT `attr_name` FROM " . $GLOBALS['ecs']->table('attribute') . " WHERE `attr_id` = '" . intval($value) . "'");
}
}
return $tmp_fields;
}

/**
* 数组合并
*
* @param array $array1 数组1
* @param array $array2 数组2
*
* @return array
*/
function my_array_merge($array1, $array2)
{
$new_array = $array1;
foreach ($array2 as $key => $val)
{
$new_array[$key] = $val;
}
return $new_array;
}

/**
* 生成商品导出过滤条件
*
* @param array $filter 过滤条件数组
*
* @return string
*/
function get_export_where_sql($filter)
{
$where = '';
if (!empty($filter['goods_ids']))
{
$goods_ids = explode(',', $filter['goods_ids']);
if (is_array($goods_ids) && !empty($goods_ids))
{
$goods_ids = array_unique($goods_ids);
$goods_ids = "'" . implode("','", $goods_ids) . "'";
}
else
{
$goods_ids = "'0'";
}
$where = " WHERE g.is_delete = 0 AND g.goods_id IN (" . $goods_ids . ") ";
}
else
{
$_filter = new StdClass();
$_filter->cat_id = $filter['cat_id'];
$_filter->brand_id = $filter['brand_id'];
$_filter->keyword = $filter['keyword'];
$where = get_where_sql($_filter);
}
return $where;
}

/**
* 替换影响csv文件的字符
*
* @param $str string 处理字符串
*/
function replace_special_char($str, $replace = true)
{
$str = str_replace("\r\n", "", image_path_format($str));
$str = str_replace("\t", " ", $str);
$str = str_replace("\n", "", $str);
if ($replace == true)
{
$str = '"' . str_replace('"', '""', $str) . '"';
}
return $str;
}

function get_order_goods($id)
{
$sql = 'select goods_id,goods_name,goods_number from '.$GLOBALS['ecs']->table('order_goods').' as o where o.order_id = '.$id;

$str = array();
$query = $GLOBALS['db']->query($sql);
while ($row = $GLOBALS['db']->fetchRow($query))
{
$str[0] .= ' ['.$row['goods_name'].'] ';
$str[1] .= ' ['.$row['goods_number'].'] ';
}
return $str;
}
function get_action_note($id)
{
$sql = 'select action_user,order_status ,action_note from '.$GLOBALS['ecs']->table('order_action') . ' where order_id = '.$id;
$str = array();
$query = $GLOBALS['db']->query($sql);
while ($row = $GLOBALS['db']->fetchRow($query))
{
$str[0] .= $row['action_user'].' |';
$str[1] .= $row['action_note'].' |';
}
return $str;
}
?>

我所实现的导出订单功能比较简单。可以根据个人需要改。原理是这样的哦。

13# lpp2675201
有没有order_export.htm文件?

也在找这个东西,谢谢楼上发的代码,不过如果能把模板文件也共享一下就更好了,呵呵。谢谢!