请教关于 ECSHOP推送UCH的问题

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

请教关于 ECSHOP推送UCH的问题
本帖最后由 玻璃屋女孩 于 2009-6-4 09:10 编辑

ecshop和UCH的会员已经整合好了

ECSHOP自动带的推送觉得不理想出现以下问题

懂得帮忙看一下怎么修改

一下图片是传送后的截图
(产品名称分开传送!图片重复性传送)
(希望一个用户购买产品后,传送一条信息 显示为商品图片,商品名称,购买价格排列5个商品横排就OK了)那个知道怎么改告诉一下小弟感激不尽
/**
* 通过判断is_feed 向UCenter提交Feed
*
* @access public
* @paraminteger $value_id$order_id or $comment_id
* @paraminterger $feed_type BUY_GOODS or COMMENT_GOODS
*
* @return void
*/
function add_feed($id, $feed_type)
{
$feed = array();
if ($feed_type == BUY_GOODS)
{
if (empty($id))
{
return;
}
$id = intval($id);
$order_res = $GLOBALS['db']->getAll("SELECT g.goods_id, g.goods_name, g.goods_sn, g.goods_thumb, o.goods_price FROM " . $GLOBALS['ecs']->table('order_goods') . " AS o, " . $GLOBALS['ecs']->table('goods') . " AS g WHERE o.order_id='{$id}' AND o.goods_id=g.goods_id");
foreach($order_res as $goods_data)
{
$url = $GLOBALS['ecs']->url() . $goods_data['goods_thumb'];
$link = $GLOBALS['ecs']->url() . "goods.php?id=" . $goods_data["goods_id"];

$feed['icon'] = "goods";
$feed['title_template'] = '<b>{username} ' . $GLOBALS['_LANG']['feed_user_buy'] . ' {goods_name}</b>';
$feed['title_data'] = array('username'=> $_SESSION['user_name'], 'goods_name'=> $goods_data['goods_name']);
$feed['body_template'] = '{goods_name}' . $GLOBALS['_LANG']['feed_goods_price'] . ':{goods_price}' ;
$feed['body_data'] = array('goods_name'=>$goods_data['goods_name'], 'goods_price'=>$goods_data['goods_price']);
$feed['images'][] = array('url'=> $url,
'link'=> $link);
uc_call("uc_feed_add", array($feed['icon'], $_SESSION['user_id'], $_SESSION['user_name'], $feed['title_template'], $feed['title_data'], $feed ['body_template'], $feed['body_data'], '', '', $feed['images']));
}
}
return;
}

QQ:11325544