ECSHOP导出淘宝数据相册问题

2016-07-07 15:01 来源:www.chinab4c.com 作者:ecshop专家

导出淘宝数据的时候,将相册里面的大图导到产品说明里面去,做为产品描述。有没有高手实现过的

回答:
支持下!~ECSHOP导出淘宝数据相册

过来看看

高手在哪里

高手帮下忙哈。网上找的代码。没有报错,但是没有调用相册成功
找出导出文件 admin\goods_export.php
从104行:
while ($row = $db->fetchRow($res))
{
下面开始添加这段代码:


/*2010-4-29修改淘宝微缩图地址*/
$pici=1;
$sql = "SELECT gg.img_url,gg.goods_id FROM " . $ecs->table('goods_gallery') . " AS gg Where gg.goods_id=".$row['goods_id'] ." Order by gg.img_id";
$query = $db->query($sql);
$goods_value['goods_desc']='';
while($rs = $db->fetchRow($query))
{
if ($pici==1)
{
$goods_value['goods_img'] = '"' . $rs['img_url'] . '"';
}
$goods_value['goods_desc'] = $goods_value['goods_desc']."<img src=http://www.bluemx.net/".$rs['img_url']." /><br>";

//蓝色网址部分修改成你自己存放图片的网站地址
if (!empty($rs['img_url']) && is_file(ROOT_PATH . $rs['img_url']))
{
$zip->add_file(file_get_contents(ROOT_PATH . $rs['img_url']), $rs['img_url']);
}
$pici++;
}
/*2010-4-29修改淘宝微缩图地址END*/

如果你的网店是中文,想继续采用中文文字介绍,就在下面第3行的这个语句

$goods_value['goods_desc'] = replace_special_char($row['goods_desc']);
修改成:$goods_value['goods_desc'] = replace_special_char($row['goods_desc'])."<br>".$goods_value['goods_desc'];